Skip to content

Commit

Permalink
chore: Prefer Node.js env-file flag over dotenv
Browse files Browse the repository at this point in the history
  • Loading branch information
TAEMBO committed Oct 13, 2024
1 parent da55420 commit 96fa499
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 21 deletions.
8 changes: 1 addition & 7 deletions ecosystem.config.cjs
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
require("dotenv/config");

// We use this file when working with PM2 for compatibility when loading ENV variable(s)
// as a replacement for `npm run start`
module.exports = {
apps: [
{
name: "Livemap",
script: "build/index.js",
env: {
PORT: process.env.PORT
}
interpreter_args: "--env-file=.env"
}
]
}
12 changes: 0 additions & 12 deletions package-lock.json

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

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@
"build": "npm run check && npm run build:tsc && npm run lint",
"build:tsc": "vite build",
"preview": "vite preview",
"start": "node -r dotenv/config .",
"start": "node --env-file=.env .",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "eslint ./src"
},
"dependencies": {
"dotenv": "^16.4.5",
"farming-simulator-types": "^1.6.0",
"xml-js": "^1.6.11"
},
Expand Down

0 comments on commit 96fa499

Please # to comment.