feat(docker): provide a more efficient compilation inside docker

This commit is contained in:
davinkevin 2022-03-26 17:00:09 +01:00
parent 519214b0a4
commit 27d832c7b1
No known key found for this signature in database
GPG Key ID: B323BEBBC8EE667E
2 changed files with 4 additions and 2 deletions

View File

@ -11,7 +11,8 @@ COPY package*.json ./
RUN npm install
COPY . .
RUN ./node_modules/.bin/tsc
EXPOSE 4000
CMD ["npm", "start"]
CMD ["npm", "run", "start:prod"]

View File

@ -17,7 +17,8 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "tsc && node public/js/server.js",
"start:dev": "tsc && node public/js/server.js & tsc-watch"
"start:dev": "tsc && node public/js/server.js & tsc-watch",
"start:prod": "node public/js/server.js"
},
"keywords": [
"wordle",