O
O
Orc2020-01-21 16:56:06
Vue.js
Orc, 2020-01-21 16:56:06

How to properly run node.js application through forever + development.json process manager?

I compile / run the server via SSH like this

$ yarn buil
$ yarn start serve

The package.json on the host had
package.json
.
    "license": "MIT",
    "private": true,
    "scripts": {
      "serve": "vue-cli-service serve",
      "build": "vue-cli-service build"
    },
.

I decided to use the process manager.
Installed forever , tweaked development.json , tweaked package.json
package.json
.
    "license": "MIT",
    "private": true,
    "scripts": {
      "serve": "vue-cli-service serve",
      "build": "vue-cli-service build",
      "app": "node ./node_modules/forever start ./development.json"
    },
.

development.json
{
      "uid": "app",
      "append": true,
      "watch": true,
      "watchDirectory": "dist/",
      "script": "",
      "sourceDir": "/",
      "command": "yarn start serve"
    }

As a result, I enter the SSH $ yarn app command,
4FZe3.png
but the server does not rise ...
Tell me how to implement it correctly in my case?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question