Skip to content

Commit 1a10549

Browse files
authored
Add files via upload
1 parent 76ea5af commit 1a10549

File tree

4 files changed

+320
-55
lines changed

4 files changed

+320
-55
lines changed

package-lock.json

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"bcrypt": "^5.0.1",
1414
"body-parser": "^1.20.0",
1515
"cors": "^2.8.5",
16+
"dotenv": "^16.0.0",
1617
"express": "^4.18.0",
1718
"fs": "^0.0.1-security",
1819
"jsonwebtoken": "^8.5.1",

server.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
require("dotenv").config();
12
const express = require("express");
23
const bodyParser = require("body-parser");
34
const swaggerDocument = require('./swagger.json');
@@ -7,11 +8,12 @@ const mongoose = require('mongoose');
78
const fs = require('fs');
89
const customCss = fs.readFileSync((process.cwd()+"/swagger.css"), 'utf8');
910

11+
1012
// Router
1113
const todoRouter = require('./routes/todoRoutes');
1214
const indexRouter = require('./routes/authRoutes');
1315

14-
const port = 3000;
16+
const port = process.env.TOKEN_SERVER_PORT;
1517
const app = express();
1618
app.use(express.json());
1719
const mongoDB = 'mongodb://127.0.0.1/todos';

0 commit comments

Comments
 (0)