Skip to content
Snippets Groups Projects
Commit bc423c1f authored by Simon Döring's avatar Simon Döring
Browse files

Remove typescript compilation to single file

Nodejs can't run the single compiled file out of the box.
parent bc9b296c
No related branches found
No related tags found
No related merge requests found
...@@ -20,8 +20,6 @@ To compile the code, install all dependencies, including the typescript compiler ...@@ -20,8 +20,6 @@ To compile the code, install all dependencies, including the typescript compiler
This can be done by running `npm install` in the `camera-server` folder. This can be done by running `npm install` in the `camera-server` folder.
Then run `npm run build` in the same folder. This will compile the files into a newly created folder `dist`. Then run `npm run build` in the same folder. This will compile the files into a newly created folder `dist`.
If you want to compile the code into a single file, run `npm run build-single-file` instead.
Once the code is compiled, the server can be started with `node server.js` in the `dist` folder. Once the code is compiled, the server can be started with `node server.js` in the `dist` folder.
## Config ## Config
......
...@@ -3,8 +3,7 @@ ...@@ -3,8 +3,7 @@
"version": "1.0.0", "version": "1.0.0",
"main": "server.js", "main": "server.js",
"scripts": { "scripts": {
"build": "npx tsc", "build": "npx tsc"
"build-single-file": "npx tsc -m amd --outfile dist/server.js"
}, },
"dependencies": { "dependencies": {
"socket.io": "^3.0.4" "socket.io": "^3.0.4"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment