boiler plate repository for installing a default node.js server, nginx with vagrant
###set up
vagrant up
###run jump into your vm, then run the node server
vagrant ssh
cd /var/www/nodeapp
node server.js`
###notes if you just want to use localhost 127.0.0.1
- comment out
config.vm.network "private_network ..."
line in your Vagrantfile, - change the private ip to
127.0.0.1
in your default nginx file, and server.js file
the default file will be copied to /etc/nginx/sites-available/default
to overwrite the initial nginx default file
the server.js runs in your /var/www/nodeapp
folder which is synced up to your host as a shared folder.
###links
digital ocean node ubuntu guide