From e6b796e6ac7ff89d31ede4f111e0af538dd0f333 Mon Sep 17 00:00:00 2001 From: Eduardo Wesley Date: Sun, 26 Jul 2020 23:27:11 -0300 Subject: [PATCH] change deploy config --- package.json | 2 +- server/.gitignore | 3 ++- server/package.json | 3 ++- server/tsconfig.json | 4 ++++ 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 869c66e..9bdfa6d 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "author": "Eduardo Wesley ", "license": "MIT", "scripts": { - "postinstall": "cd server && yarn", + "postinstall": "cd server && yarn && yarn build", "start": "cd server && yarn start" } } diff --git a/server/.gitignore b/server/.gitignore index b512c09..f06235c 100644 --- a/server/.gitignore +++ b/server/.gitignore @@ -1 +1,2 @@ -node_modules \ No newline at end of file +node_modules +dist diff --git a/server/package.json b/server/package.json index 25438ea..615ccad 100644 --- a/server/package.json +++ b/server/package.json @@ -5,7 +5,8 @@ "license": "MIT", "scripts": { "dev": "nodemon --watch '*.ts' --exec 'ts-node' app.ts", - "start": "node app.js" + "start": "node ./dist/app.js", + "build": "tsc -p tsconfig.json" }, "dependencies": { "express": "^4.17.1", diff --git a/server/tsconfig.json b/server/tsconfig.json index c1df235..68fcb49 100644 --- a/server/tsconfig.json +++ b/server/tsconfig.json @@ -3,6 +3,10 @@ "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ + "outDir": "./dist", + "rootDir": "./", + "removeComments": true, + "strict": true, /* Enable all strict type-checking options. */ "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */