Simplify compiling and running

This commit is contained in:
Daniel Løvbrøtte Olsen 2019-02-27 14:36:13 +01:00
parent 1cb6d03765
commit e54be5da02
4 changed files with 12 additions and 1 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
config.json
node_modules
build

View File

@ -4,5 +4,6 @@ WORKDIR /server
COPY . /server
RUN npm install
RUN mkdir build && npm build
CMD [ "npm", "start" ]

View File

@ -4,7 +4,8 @@
"description": "Language bot for matrix",
"main": "index.js",
"scripts": {
"start": "nodemon --exitcrash --ignore *.sqlite -x ts-node index.ts"
"build": "tsc",
"start": "node build/index.js"
},
"author": "Daniel",
"license": "ISC",

8
tsconfig.json Normal file
View File

@ -0,0 +1,8 @@
{
"compilerOptions": {
"outDir": "build"
},
"files": [
"index.ts"
]
}