Giter Club home page Giter Club logo

node_vagrant_master's Introduction

node-vagrant

zelda-nyan

It's dangerous to go alone! Here's a reliable Vagrant setup to help you on your Node adventure.

This uses an Ubuntu 14.04 LTS 64-bit box with sugar, spice and everything that's nice.

Usage

vagrant up
vagrant ssh

Setup

Make sure you have installed VirtualBox and at least Vagrant 1.7.2.

Installing a Vagrant box (only required if the host lacks the image). Nothing fancy:

$ vagrant box add ubuntu/trusty64

Optional: For future proofing the machine against Virtualbox updates, install the plugin.

$ vagrant plugin install vagrant-vbguest

Provisioning

The scripts folder contains all the required material, during the provisioning process, bootstrap.sh will be called, which in turn will execute the following:

  1. install_build_tools.sh - updates and installs common required deps, such as git, vim and build-essential.
  2. install_* - installs tools such as mongoDB and PostgreSQL
  3. Installs npm packages such as nodemon, bower and ember-cli.

Misc

Ports 1337, 3000, 4200 and 5000 are forwarded to the host, so when you type http://localhost:3000 on your browser, it points to your VM.

Seeing as we don't want to run sudo npm install each time we use node, this box uses an unprivileged installation of nvm to run node. As such, install_nvm.sh gets called as the last provisioning step by the non-root user.

Start VM and login

$ vagrant up
$ vagrant ssh

Reloading changes

vagrant reload  # restarts the VM, skipping the initial import step.
vagrant reload --provision  # the flag instructs Vagrant to run the provisioners

Suspending/halting the machine

vagrant suspend # save the current running state of the machine and stop it (dumps RAM contents to disk)
vargant halt    # gracefully shut down the guest OS and power down the guest machine

Nuking your box

vagrant destroy # will remove all traces of the guest machine from your system

Remember you can call vagrant up at any time and Vagrant will recreate your work environment.

node_vagrant_master's People

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.