Skip to content

Instantly share code, notes, and snippets.

@andreasonny83
Last active January 2, 2017 15:10
Show Gist options
  • Save andreasonny83/1c51ff49e1f9ef15de11ab0ea6255569 to your computer and use it in GitHub Desktop.
Save andreasonny83/1c51ff49e1f9ef15de11ab0ea6255569 to your computer and use it in GitHub Desktop.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment