start http-server to serve a project folder:
http-server -a localhost -p 8000 -c-1 ./dist
For Angular1-2 project, use lite-server
instead
Running the server in the background and run protractor test using that server:
http-server -a localhost -p 8000 -c-1 ./dist > /dev/null &
protractor protractor.conf.js
Note: the http-server will keep running in the background. To find and kill the task, run:
ps axl | grep node
and kill the process with
kill -9 TASK_ID