Skip to content

Commit

Permalink
add dotenv to load envs
Browse files Browse the repository at this point in the history
  • Loading branch information
petertimwalker committed May 24, 2024
1 parent 35f2a20 commit 74d6a39
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
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.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"license": "ISC",
"dependencies": {
"cors": "^2.8.5",
"dotenv": "^16.4.5",
"express": "^4.19.2"
}
}
2 changes: 2 additions & 0 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ const express = require('express');
const cors = require('cors');
const app = express();
const PORT = process.env.PORT || 443;
const dotenv = require('dotenv');
dotenv.config();

// Use CORS middleware to allow requests from all origins
app.use(cors());
Expand Down

0 comments on commit 74d6a39

Please sign in to comment.