I had set up an AWS EC2 which is running Ubuntu.
I want to run a Node.js server on it and use Dropbox to sync some files. I use ssh to access my EC2 like:
ssh -i xxx.pem ubuntu@ec2-xx-xx-xx-xx.ap-northeast-1.compute.amazonaws.com
Then I set up Node.js and Dropbox. (I set up Dropbox with the guide: Dropbox official page)
I run my Node.js with:
node app.js &
And it works. I can access my website with the IP of AWS EC2.
And I run Dropbox with:
~/.dropbox-dist/dropboxd &
It also works, and sync my files.
But after I close the terminal, the website is not accessible anymore. And Dropbox also stop running.
Is there any way to keep the processes running forever?