0

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?

QProgrammer
  • 113
  • 3
  • 14
  • Tried `screen` or [tmux](https://tmux.github.io/)? – morganbaz Sep 13 '15 at 07:10
  • Hello. Yes screen did the trick and i am happy with it now. However i am still wondering what is the professional approach for this and what approach is being used the most. – QProgrammer Sep 14 '15 at 15:59

0 Answers0