Skip to content

Commit

Permalink
update env
Browse files Browse the repository at this point in the history
  • Loading branch information
Wcc723 committed Sep 15, 2023
1 parent b015984 commit fac2a10
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"bcrypt": "^5.1.1",
"cookie-parser": "~1.4.4",
"debug": "~2.6.9",
"dotenv": "^16.3.1",
"express": "~4.16.1",
"http-errors": "~1.6.3",
"jade": "~1.11.0",
Expand Down
8 changes: 8 additions & 0 deletions pnpm-lock.yaml

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

4 changes: 4 additions & 0 deletions routes/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
var express = require('express');
var router = express.Router();
require('dotenv').config();

const { ENV_VARIABLE } = process.env
console.log('環境變數:', ENV_VARIABLE);

/* GET home page. */
router.get('/', function(req, res, next) {
Expand Down

0 comments on commit fac2a10

Please sign in to comment.