mirror of
https://gitlab.com/little-lines/backend.git
synced 2024-11-25 05:46:50 +00:00
create base project
This commit is contained in:
parent
2b46f7c3ce
commit
24e7aa1ad0
9 changed files with 1566 additions and 0 deletions
27
.gitignore
vendored
Normal file
27
.gitignore
vendored
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
# Logs
|
||||||
|
logs
|
||||||
|
*.log
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
pnpm-debug.log*
|
||||||
|
lerna-debug.log*
|
||||||
|
|
||||||
|
node_modules
|
||||||
|
dist
|
||||||
|
dist-ssr
|
||||||
|
*.local
|
||||||
|
|
||||||
|
# Editor directories and files
|
||||||
|
.vscode/*
|
||||||
|
!.vscode/extensions.json
|
||||||
|
.idea
|
||||||
|
.DS_Store
|
||||||
|
*.suo
|
||||||
|
*.ntvs*
|
||||||
|
*.njsproj
|
||||||
|
*.sln
|
||||||
|
*.sw?
|
||||||
|
|
||||||
|
#env
|
||||||
|
.env
|
0
config/dbConnection.js
Normal file
0
config/dbConnection.js
Normal file
0
controllers/userController.js
Normal file
0
controllers/userController.js
Normal file
0
models/user.js
Normal file
0
models/user.js
Normal file
1496
package-lock.json
generated
Normal file
1496
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
28
package.json
Normal file
28
package.json
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
{
|
||||||
|
"name": "backend",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "",
|
||||||
|
"main": "index.js",
|
||||||
|
"scripts": {
|
||||||
|
"test": "echo \"Error: no test specified\" && exit 1",
|
||||||
|
"dev": "nodemon server.js"
|
||||||
|
|
||||||
|
},
|
||||||
|
"keywords": [],
|
||||||
|
"author": "",
|
||||||
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"bcryptjs": "^2.4.3",
|
||||||
|
"body-parser": "^1.20.2",
|
||||||
|
"cookie-session": "^2.0.0",
|
||||||
|
"cors": "^2.8.5",
|
||||||
|
"dotenv": "^16.3.1",
|
||||||
|
"express": "^4.18.2",
|
||||||
|
"express-async-handler": "^1.2.0",
|
||||||
|
"express-session": "^1.17.3",
|
||||||
|
"jsonwebtoken": "^9.0.2",
|
||||||
|
"mongoose": "^7.5.1",
|
||||||
|
"nodemon": "^3.0.1",
|
||||||
|
"validator": "^13.11.0"
|
||||||
|
}
|
||||||
|
}
|
0
routes/user.js
Normal file
0
routes/user.js
Normal file
15
server.js
Normal file
15
server.js
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
const express = require("express");
|
||||||
|
const app = express();
|
||||||
|
const cors = require('cors');
|
||||||
|
const dotenv = require("dotenv").config();
|
||||||
|
const connectDb = require('./config/dbConnection');
|
||||||
|
|
||||||
|
app.use(express.json());
|
||||||
|
app.use(cors());
|
||||||
|
|
||||||
|
|
||||||
|
app.listen(process.env.PORT, () => {
|
||||||
|
console.log(`server's running on port ${process.env.PORT}`);
|
||||||
|
})
|
||||||
|
|
||||||
|
connectDb();
|
0
utils/jwtToken.js
Normal file
0
utils/jwtToken.js
Normal file
Loading…
Reference in a new issue