Skip to content

Commit

Permalink
env
Browse files Browse the repository at this point in the history
  • Loading branch information
ChhatreshKhatri committed Nov 15, 2023
1 parent d3c292d commit e120552
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
8 changes: 5 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
const express = require("express");
const cors = require("cors");
const svgBadge = require("./frontend/src/svgBadge");
const { port, mongourl } = require('./config.json');
// const port=process.env.PORT;
// const mongourl=process.env.MONGODB_URI;
// const { port, mongourl } = require('./config.json');

require('dotenv').config();
const port=process.env.PORT;
const mongourl=process.env.MONGODB_URI;

// Create an express instance and setup middlewares
const app = express();
Expand Down
12 changes: 12 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
},
"dependencies": {
"cors": "^2.8.5",
"dotenv": "^16.3.1",
"express": "^4.18.1",
"mongoose": "^6.4.6"
}
}
}

0 comments on commit e120552

Please sign in to comment.