Created
September 15, 2017 16:39
-
-
Save tklee1975/368826dce001e979874db717e8998f03 to your computer and use it in GitHub Desktop.
Start and Stop a Node Server in Background
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| node node_server.js >> node_server.log & |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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