Giter VIP home page Giter VIP logo

vagrant-nodejs-app-starter's Introduction

Vagrant Node.js App Starter

A Node.js project starter, utilizing a Vagrant VM (default: Ubuntu 12.04 Precise Pangolin 32-bit) provisioned with Chef Solo.

Cookbooks included:

Dependencies

You must install the following dependencies:

Usage

Clone it into your project folder.

$ git clone https://github.com/devert/vagrant-nodejs-app-starter [proj-name]
$ rm -rf .git

Open the vagrant/Vagrantfile and modify all proj-name instances to the name of your project.

  • Modify the Node.js version you would like installed in the chef.json attributes.
  • Modify the Chef version you would like installed with the config.omnibus.chef_version attribute.
$ vagrant plugin install vagrant-omnibus
$ vagrant plugin install vagrant-librarian-chef
$ cd vagrant
$ vagrant up
$ vagrant ssh
$ node proj-name/app.js

After running the above commands you should be able to browse to http://locahost:3000/ and see "Hello World!" on your host machine. Changes to files via the host machine will immediately be updated on the guest VM as well. You'll just have to remember to start and stop the node server. Or you can install a daemon tool like Forever to watch for updates to your application files (details below).

Now get in there and build something awesometronic with Node.js!

Optional (But Pretty Great)

Node.js

  • Keep the Node.js web server running and restart on file changes with Forever. Install this in the Vagrant VM.

    $ npm install forever -g
    $ forever -w proj-name/app.js

vagrant-nodejs-app-starter's People

Contributors

devert avatar vykster avatar

Watchers

 avatar  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.