NodeJS with Vagrant
On the previous post i showed how to have docker and docker-compose with Vagrant. In this post i will show how to have a simple NodeJS environment with Vagrant.
I will show how to install the most common solutions and frameworks for node like: npm, express, qunit, yo and much more.
It`s very easy, you need to have vagrant installed, them just copy my Vagrantfile and create a directory called shared on the same folder you have copied my Vagrant file. After that you are ready to rock.
The Vagrantfile
Inside the shared directory you will need create a file called, hello.js
Now you ready, just run $ vagrant up && vagrant ssh
Vagrant will download and install all nodejs stack and enter on the box via ssh, once it finished you can type on linux box:
$ cat ~/shared/hello.js | node
NodeJS will bootup a server and you can access in your web browser on: http://55.55.55.101:8000/
If you want all the files you can get on my github here: https://github.com/diegopacheco/Diego-Pacheco-Sandbox/tree/master/DevOps/vagrant-with-nodejs
Cheers,
Diego Pacheco
I will show how to install the most common solutions and frameworks for node like: npm, express, qunit, yo and much more.
It`s very easy, you need to have vagrant installed, them just copy my Vagrantfile and create a directory called shared on the same folder you have copied my Vagrant file. After that you are ready to rock.
The Vagrantfile
Inside the shared directory you will need create a file called, hello.js
Now you ready, just run $ vagrant up && vagrant ssh
Vagrant will download and install all nodejs stack and enter on the box via ssh, once it finished you can type on linux box:
$ cat ~/shared/hello.js | node
NodeJS will bootup a server and you can access in your web browser on: http://55.55.55.101:8000/
If you want all the files you can get on my github here: https://github.com/diegopacheco/Diego-Pacheco-Sandbox/tree/master/DevOps/vagrant-with-nodejs
Cheers,
Diego Pacheco