This commit is contained in:
2021-08-16 13:00:22 -05:00
parent 3a4080a5ac
commit 885bfa5fcf
11 changed files with 3204 additions and 0 deletions
+3
View File
@@ -0,0 +1,3 @@
node_modules/
.env
+6
View File
@@ -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

+3144
View File
File diff suppressed because it is too large Load Diff
+28
View File
@@ -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"
}
}
+23
View File
@@ -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'));