user2747220
user2747220

Reputation: 893

starting parse-dashboard using pm2

How can I run parse-dashboard permanently using pm2? I have tried the following:

dashboard.json

{
  "apps" : [{
    "name"        : "parse-dash”,
    "script"      : "/usr/local/bin/parse-dashboard”,
    "watch"       : true,
    "merge_logs"  : true,
    "cwd"         : "/home/parse",
    "args"         : "--config dashboard-config.json"
  }]
}

and starting pm2:

pm2 start dashboard.json

but I get the following error:

evalmachine.<anonymous>:3
    "name"        : "parse-dash”,
                    ^^^^^^^^^^^^^^^^^^

SyntaxError: Unexpected token ILLEGAL
    at Object.exports.runInThisContext (vm.js:53:16)
    at Object.module.exports.parseConfig (/usr/local/lib/node_modules/pm2/lib/Utility.js:145:17)
    at Object.CLI._startJson (/usr/local/lib/node_modules/pm2/lib/CLI.js:302:23)
    at Object.CLI.start (/usr/local/lib/node_modules/pm2/lib/CLI.js:98:9)
    at /usr/local/lib/node_modules/pm2/bin/pm2:249:13
    at /usr/local/lib/node_modules/pm2/node_modules/async/lib/async.js:181:20
    at replenish (/usr/local/lib/node_modules/pm2/node_modules/async/lib/async.js:319:21)
    at /usr/local/lib/node_modules/pm2/node_modules/async/lib/async.js:330:15
    at Object.async.forEachLimit.async.eachLimit (/usr/local/lib/node_modules/pm2/node_modules/async/lib/async.js:220:35)
    at Command.<anonymous> (/usr/local/lib/node_modules/pm2/bin/pm2:248:13)

I'm not familiar with node_modules and I am not sure if I am pointing to the right folder.

Upvotes: 4

Views: 1399

Answers (1)

Jotta E
Jotta E

Reputation: 302

Hi man you saved my life, i was just looking for a solution too. The problem in your code is the last comma separated on these lines:

"name"        : "parse-dash”,
"script"      : "/usr/local/bin/parse-dashboard”, 

change to :

"name"        : "parse-dash",
"script"      : "/usr/local/bin/parse-dashboard",

hope it helps.

Upvotes: 4

Related Questions