reto 1
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
node_modules/
|
||||
|
||||
.env
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"trailingComma": "es5",
|
||||
"tabWidth": 2,
|
||||
"semi": true,
|
||||
"singleQuote": true
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 8.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 65 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 34 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 134 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 34 KiB |
Generated
+3144
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"name": "api",
|
||||
"version": "1.0.0",
|
||||
"description": "Esta es la plantilla para una api",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "node ./server/config/test",
|
||||
"db:install": "node ./server/db/install",
|
||||
"db:data-fake": "node ./server/db/data-fake",
|
||||
"dev": "nodemon ./server/app",
|
||||
"start": "node ./server/app"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": ""
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"body-parser": "^1.19.0",
|
||||
"colors": "^1.4.0",
|
||||
"cors": "^2.8.5",
|
||||
"express": "^4.17.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"nodemon": "^2.0.7"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
const colors = require('colors');
|
||||
const bodyParser = require('body-parser');
|
||||
const cors = require('cors');
|
||||
const express = require('express');
|
||||
const app = express();
|
||||
|
||||
app.use(cors());
|
||||
|
||||
app.use(
|
||||
bodyParser.urlencoded({
|
||||
extended: false,
|
||||
})
|
||||
);
|
||||
|
||||
app.use(bodyParser.json());
|
||||
|
||||
app.get('/', (req, res) => res.send('API Plantilla'));
|
||||
|
||||
app.listen(3000, () =>
|
||||
console.log(`API Plantilla corriendo en el puerto: 3000`.rainbow)
|
||||
);
|
||||
|
||||
app.use('/imagenes', express.static('assets'));
|
||||
Reference in New Issue
Block a user