mirror of
https://github.com/20kaushik02/express-sequelize-backend-template.git
synced 2025-12-06 12:44:06 +00:00
Base app, packages, env
This commit is contained in:
parent
76b6f05e92
commit
ffa63342cc
25
index.js
Normal file
25
index.js
Normal file
@ -0,0 +1,25 @@
|
||||
require("dotenv-flow").config();7
|
||||
|
||||
const express = require("express");
|
||||
const cors = require("cors");
|
||||
const helmet = require("helmet");
|
||||
const logger = require("./utils/logger")(module);
|
||||
|
||||
const app = express();
|
||||
|
||||
app.use(express.json());
|
||||
app.use(express.urlencoded({ extended: true }));
|
||||
|
||||
app.use(cors());
|
||||
app.use(helmet());
|
||||
app.disable("x-powered-by");
|
||||
|
||||
app.use((_req, res) => {
|
||||
return res.status(200).send("Induction app back-end.");
|
||||
});
|
||||
|
||||
const port = process.env.PORT || 5000;
|
||||
|
||||
app.listen(port, () => {
|
||||
logger.info(`App Listening on port ${port}`);
|
||||
});
|
||||
4516
package-lock.json
generated
Normal file
4516
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
39
package.json
Normal file
39
package.json
Normal file
@ -0,0 +1,39 @@
|
||||
{
|
||||
"name": "induction-api-2023",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"dev": "cross-env NODE_ENV=development nodemon --exitcrash index.js",
|
||||
"prod": "cross-env NODE_ENV=production node index.js"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://gitlab.com/ctf-tech-2023/induction-api-2023.git"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"bugs": {
|
||||
"url": "https://gitlab.com/ctf-tech-2023/induction-api-2023/issues"
|
||||
},
|
||||
"homepage": "https://gitlab.com/ctf-tech-2023/induction-api-2023#readme",
|
||||
"dependencies": {
|
||||
"cors": "^2.8.5",
|
||||
"cross-fetch": "^3.1.5",
|
||||
"dotenv-flow": "^3.2.0",
|
||||
"express": "^4.18.1",
|
||||
"express-validator": "^6.14.2",
|
||||
"fast-csv": "^4.3.6",
|
||||
"helmet": "^6.0.0",
|
||||
"jsonwebtoken": "^8.5.1",
|
||||
"nodemailer": "^6.8.0",
|
||||
"pg": "^8.8.0",
|
||||
"sequelize": "^6.24.0",
|
||||
"winston": "^3.8.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"cross-env": "^7.0.3",
|
||||
"nodemon": "^2.0.20",
|
||||
"sequelize-cli": "^6.5.1"
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user