add prod script, fix bug
This commit is contained in:
@@ -6,7 +6,8 @@
|
||||
"scripts": {
|
||||
"build": "tsc -p tsconfig.json",
|
||||
"start": "tsc -w & node --watch --env-file=.env dist/index.js",
|
||||
"load_test": "export $(cat .env | xargs) && k6 run ./test/loadTest.js"
|
||||
"load_test": "export $(cat .env | xargs) && k6 run ./test/loadTest.js",
|
||||
"prod": "node --env-file=.env dist/index.js"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
|
||||
@@ -3,7 +3,7 @@ import app from "./server";
|
||||
|
||||
(async () => {
|
||||
const PORT = parseInt(process.env.PORT ?? "8000");
|
||||
const DB_URI = process.env.DB_TEST ?? "";
|
||||
const DB_URI = process.env.DB_URI ?? "";
|
||||
|
||||
await mongoose.connect(DB_URI);
|
||||
await app.listen({ port: PORT, host: "0.0.0.0" });
|
||||
|
||||
Reference in New Issue
Block a user