From 11996e5174be9e0992db11ca4619c5fce21737e8 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Mon, 10 Jan 2022 01:41:34 -0500 Subject: [PATCH] Compile and run server directly for prod, instead of using ts-node --- server/.gitignore | 1 + server/package.json | 4 +++- server/tsconfig.json | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 server/.gitignore diff --git a/server/.gitignore b/server/.gitignore new file mode 100644 index 0000000..849ddff --- /dev/null +++ b/server/.gitignore @@ -0,0 +1 @@ +dist/ diff --git a/server/package.json b/server/package.json index 8693733..0932e26 100644 --- a/server/package.json +++ b/server/package.json @@ -21,6 +21,8 @@ }, "scripts": { "start": "npm run dev", - "dev": "ts-node --files ./src/server.ts" + "dev": "ts-node --files ./src/server.ts", + "build": "tsc", + "serve": "node dist/server.js" } } diff --git a/server/tsconfig.json b/server/tsconfig.json index 5d110dc..ca04309 100644 --- a/server/tsconfig.json +++ b/server/tsconfig.json @@ -1,9 +1,11 @@ { + "include": ["src/**/*"], "compilerOptions": { "target": "es5", "strict": true, "module": "commonjs", "moduleResolution": "node", + "outDir": "dist", "experimentalDecorators": true } }