Ng build -w and lite-server concurrently

168
November 25, 2017, at 4:18 PM

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.

READ ALSO
Angular2 Visual Studio 2017 MVC: Uncaught TypeError: System.config is not a function

Angular2 Visual Studio 2017 MVC: Uncaught TypeError: System.config is not a function

I am building Angular2 web application through Visual Studio 2017 ASPNET MVC

360
How to acces node server outside local network?

How to acces node server outside local network?

im writing a webserver in nodeJs as seen in the following codeI got the server working but sadly i cant acces the website outside my network (localhost)

162
How to use craigslist api for searching on HTML page

How to use craigslist api for searching on HTML page

I have a simple html page which I'm using to search using craigslist apiHow should I display the results from that query back to HTML page?

199