I am using the actionhero framework, it can be started by command actionhero start. but the problem is that, my cloud node.js app runner can only run an app by specify a main file, such as index.js. How can I adapt my app to be started by a normal node.js file?
2 Answers
You have two choices
Choice #1
You can use child_process to execute any shell from your node.js application. See this How can I invoke Ruby from Node.js? as a reference. This method is a native node.js way. You don't need to install any external npm.
Choice #2
Use shelljs to execute such command. (https://github.com/arturadib/shelljs) The way it allows you execute the command is quite similar to using child_process but it makes your code a little neater.