Skip to content

Commit

Permalink
新增環境變數設定檔案載入條件
Browse files Browse the repository at this point in the history
  • Loading branch information
hanshino committed Feb 5, 2024
1 parent 2bb8fd2 commit 45bc54e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions app/knexfile.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// Update with your config settings.
require("dotenv").config({
path: "../.env",
});
if (process.env.NODE_ENV !== "production") {
require("dotenv").config({
path: "../.env",
});
}

module.exports = {
development: {
Expand Down

0 comments on commit 45bc54e

Please sign in to comment.