# Npm install as a dependency

**URL:** <https://forum.serverless.com/t/npm-install-as-a-dependency/3744>\
**Category:** Serverless Framework\
**Created:** [February 10, 2018, 9:34pm UTC](https://forum.serverless.com/t/npm-install-as-a-dependency/3744 "2018-02-10T21:34:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknown075](https://avatars.discourse-cdn.com/v4/letter/u/48db29/32.png) [@unknown075](https://forum.serverless.com/u/unknown075)\
**Post date:** [February 10, 2018, 9:34pm UTC](https://forum.serverless.com/t/npm-install-as-a-dependency/3744/1 "2018-02-10T21:34:10Z")

</div>

Hello guys,

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

---

<div class="post-metadata">

**Author:** ![DavidWells](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/davidwells/32/201_2.png) [@DavidWells](https://forum.serverless.com/u/DavidWells)\
**Post date:** [February 11, 2018, 11:31pm UTC](https://forum.serverless.com/t/npm-install-as-a-dependency/3744/2 "2018-02-11T23:31:55Z")

</div>

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](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](https://github.com/serverless/dashboard/blob/master/app/actions/runInvoke.js#L31)
