Skip to content

Instantly share code, notes, and snippets.

@tklee1975
Created September 15, 2017 16:39
Show Gist options
  • Select an option

  • Save tklee1975/368826dce001e979874db717e8998f03 to your computer and use it in GitHub Desktop.

Select an option

Save tklee1975/368826dce001e979874db717e8998f03 to your computer and use it in GitHub Desktop.
Start and Stop a Node Server in Background
#!/bin/sh
node node_server.js >> node_server.log &
#!/bin/sh
kill -9 $(ps aux | grep 'node\ node_server.js' | awk '{print $2}')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment