Run Mongodb and Node using forever
<p>I am new to Node Js and Mongodb. To start working with node and mongodb, everyday I need to start the services using,</p>

<pre><code>sudo mongod
node server.js
</code></pre>

<p>Instead, I need a script or command that will automatically run on my server without any interruption. For that I used forever.I installed forever using,</p>

<pre><code>sudo npm install forever -g
</code></pre>

<p>After that, I have tried the following,</p>

<pre><code>forever start -c ./usr/local/cellar/mongodb/2.6.6/bin/mongod/

forever start server.js
</code></pre>

<p>But it is not working. I have checked with </p>

<pre><code> forever list
</code></pre>

<p>it shows no forever process running. </p>

<p>Please help.</p>