Npm install as a dependency

Hello guys,

Is it possible to call serverless from an node js application? Since I cannot install it with npm install -S serverless

You can programmatically run the serverless framework with child processes in node.

Here is an example.

  1. set args for serverless command https://github.com/serverless/dashboard/blob/master/app/actions/runInvoke.js#L8-L12
  2. then spawn a child process to run it https://github.com/serverless/dashboard/blob/master/app/actions/runInvoke.js#L31