1

I have server and client part application. The server is nodejs + express, which serves static HTML from the public folder. In public folder is built Angular 2 application - ng build with the destination of the public folder.

I am using for development lite-server which is working fine and after every edit/save in server part the server restarts. When I am editing client part I have to run ng build -w in a separate terminal window - after deployment to public folder lite-server restarts and I have refreshed version of the page.

Is there any solution how to run these commands concurrently? I figure out this:

"start:watch": "concurrently --kill-others \"npm run build-client:dev\" \"lite-server -c lite-server.config.json\""

but it crashes on an initial run with error:

[1] [Browsersync] Reloading Browsers...
[1] 17.11.24 21:53:30 404 GET /index.html
[1] events.js:163
[1]       throw er; // Unhandled 'error' event
[1]       ^
[1]
[1] Error: EPERM: operation not permitted, lstat 'D:\Projects\Angular NodeJS Authentification prototype\public'

error occurs about every 5th run.

Podlipny
  • 75
  • 3
  • 9

0 Answers0