I have an express node project. I am starting the server by running command npm start inside project folder in my local and it works as expected.
I tried to run the same command on remote linux VM. But after closing the terminal, server is shutting down. So I tried to start with npm start & and nohup npm start &. But still after closing the terminal server is stopping.
So how can I start the node server for express project in background?
My package.json files looks like this:
{
  "name": "test_project",
  "version": "0.0.0",
  "private": true,
  "scripts": {
    "start": "concurrently \"tsc -w\" \"node ./bin/www\" ",
    "tsc": "tsc",
    "tsc:w": "tsc -w",
    "typings": "typings install",
    "bundle": "node bin/bundler.js",
    "bundle:prod": "node bin/bundler.js --prod"
  },
  "dependencies": {
    "body-parser": "~1.13.2",
    "cookie-parser": "~1.3.5",
    "debug": "~2.2.0",
    "express": "~4.13.1",
    "morgan": "~1.6.1",
    "serve-favicon": "~2.3.0",
    "mongodb": "2.2.4",
    "request": "~2.73.0"
  },
  "devDependencies": {
    "@angular/common": "2.0.0-rc.3",
    "@angular/compiler": "2.0.0-rc.3",
    "@angular/core": "2.0.0-rc.3",
    "@angular/http": "2.0.0-rc.3",
    "@angular/platform-browser": "2.0.0-rc.3",
    "@angular/platform-browser-dynamic": "2.0.0-rc.3",
    "@angular/router": "^3.0.0-alpha.7",
    "@angular/router-deprecated": "2.0.0-rc.2",
    "@angular/upgrade": "2.0.0-rc.3",
    "systemjs": "0.19.27",
    "core-js": "^2.4.0",
    "reflect-metadata": "^0.1.3",
    "rxjs": "5.0.0-beta.6",
    "zone.js": "^0.6.12",
    "angular2-in-memory-web-api": "0.0.12",
    "concurrently": "^2.0.0",
    "systemjs-builder": "^0.15.17",
    "typescript": "^1.8.10",
    "typings": "^1.3.0",
    "yargs": "^4.7.1"
  }
}
 
     
     
     
    