Hello from the LoopBack team :)
LoopBack 4 applications use different project layout. They are written in TypeScript, store TypeScript sources in src
and transpiled JavaScript files in dist
. There are no common
and serve
(did you mean server
?) directories to watch for changes.
It is not enough to watch for changes in your source code, you also need to recompile from TypeScript to JavaScript before restarting the app.
We are looking into the best way how to support automatic reload of LB4 applications in development, please subscribe to the discussion in issue #2242.
A community user recommended the following nodemon config, it should be added to application's package.json
file:
"nodemonConfig": {
"watch": [
"src"
],
"ext": "ts",
"exec": "npm start"
}
npm install -i tsc-watch
– Daman