Difficulty in deploying Node.JS + Grunt based web application from terminal

35 views Asked by At

I have a website which is developed based on Node.JS and uses grunt to be run.

I want to deploy it on my aws server. So, i installed node.js and all its dependencies and modules, configured database etc, and i am able to run it from terminal.

First i used

grunt build

and then

grunt

and website is running and up without any problem.

My question is that how should i deploy these kind of websites, so it always is running and listening to the port? That is because whenever i close the terminal (Putty), it will stop working.

I tried using these commands to run it in the background but didn't work :

grunt &

alnd also

(grunt &)

but whenever i exit the terminal (putty) , web server stops working.

Can anybody please help me with that? How can i make grunt running even after closing the terminal? And how node js + grunt websites will be deployed on the server in general?

0

There are 0 answers