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:

If you want all the files you can get on my github here:

Diego Pacheco

Popular posts from this blog

Podman in Linux

Java Agents

Manage Work not People