I want to start an working 'app.js' application using a .jason file 'start_app_1.jason'.
I expect it to start and run as if directly launched using 'pm2 start app.js'
It failed, the log shows :
"""
30|start_a | /home/test/myapp/start_app_1.jason:2
30|start_a | "apps" : [{
30|start_a | ^
30|start_a | SyntaxError: Unexpected token :
30|start_a | at Module._compile (module.js:439:25)
30|start_a | at Object.Module._extensions..js (module.js:474:10)
30|start_a | at Module.load (module.js:356:32)
30|start_a | at Function.Module._load (module.js:312:12)
30|start_a | at Object.
30|start_a | at Module._compile (module.js:456:26)
30|start_a | at Object.Module._extensions..js (module.js:474:10)
30|start_a | at Module.load (module.js:356:32)
30|start_a | at Function.Module._load (module.js:312:12)
30|start_a | at Function.Module.runMain (module.js:497:10)_
"""
Did a lot of tries modifying the .jason file, nothing works :-(
Also try to start a bash script using .jason file, no luck. But also work if launched directly...
Help please......
OS : ubuntu 14.04
node.js : v0.10.25
PM2 : 2.4.1
2017-03-01 12:08:51: App name:start_app_1 id:30 online
2017-03-01 12:08:52: App [start_app_1] with id [30] and pid [25529], exited with code [1] via signal [SIGINT]
2017-03-01 12:08:52: Script /home/gilles/longRunningProcess/myapp/start_app_1.jason had too many unstable restarts (16). Stopped. "errored"
2017-03-01 12:11:58: App [test] with id [15] and pid [25094], exited with code [0] via signal [SIGINT]
2017-03-01 12:11:58: Starting execution sequence in -fork mode- for app name:test id:15
2017-03-01 12:11:58: App name:test id:15 online
2017-03-01 12:15:33: App [test] with id [15] and pid [27717], exited with code [0] via signal [SIGINT]
2017-03-01 12:15:33: Starting execution sequence in -fork mode- for app name:test id:15
2017-03-01 12:15:33: App name:test id:15 online
2017-03-01 12:19:08: App [test] with id [15] and pid [30172], exited with code [0] via signal [SIGINT]
2017-03-01 12:19:08: Starting execution sequence in -fork mode- for app name:test id:15
2017-03-01 12:19:08: App name:test id:15 online
2017-03-01 12:22:43: App [test] with id [15] and pid [32620], exited with code [0] via signal [SIGINT]
2017-03-01 12:22:43: Starting execution sequence in -fork mode- for app name:test id:15
2017-03-01 12:22:43: App name:test id:15 online
2017-03-01 12:26:18: App [test] with id [15] and pid [2948], exited with code [0] via signal [SIGINT]
2017-03-01 12:26:18: Starting execution sequence in -fork mode- for app name:test id:15
2017-03-01 12:26:18: App name:test id:15 online
Because the extension of the file need to be .json and not .jason, simply as that :)
Most helpful comment
Because the extension of the file need to be
.jsonand not.jason, simply as that :)