2022-01-03 03:47:04 +01:00
|
|
|
# Setup backend watchers
|
|
|
|
|
|
|
|
The backend is static. Typescript scripts are compiled into the `dist` folder and served through a node web server.
|
|
|
|
|
2022-01-19 05:03:43 +01:00
|
|
|
You can avoid the manual shutdown/recompile/restart command line cycle by using a watcher.
|
2022-01-03 03:47:04 +01:00
|
|
|
|
|
|
|
Make sure you are in the `backend` directory `cd backend`.
|
|
|
|
|
2022-01-19 05:03:43 +01:00
|
|
|
1. Install nodemon and ts-node
|
|
|
|
|
2022-01-03 03:47:04 +01:00
|
|
|
```
|
2022-01-19 05:03:43 +01:00
|
|
|
sudo npm install -g ts-node nodemon
|
2022-01-03 03:47:04 +01:00
|
|
|
```
|
2022-01-19 05:03:43 +01:00
|
|
|
|
|
|
|
2. Run the watcher
|
|
|
|
|
|
|
|
> Note: You can find your npm global binary folder using `npm -g bin`, where nodemon will be installed.
|
|
|
|
|
2022-01-03 03:47:04 +01:00
|
|
|
```
|
2022-01-20 09:20:02 +01:00
|
|
|
nodemon src/index.ts --ignore cache/ --ignore pools.json
|
2022-01-03 03:47:04 +01:00
|
|
|
```
|
|
|
|
|