Skip to content

Instantly share code, notes, and snippets.

@listochkin
Last active August 29, 2015 14:08
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save listochkin/443faab75efb5398767a to your computer and use it in GitHub Desktop.
Save listochkin/443faab75efb5398767a to your computer and use it in GitHub Desktop.
Set up iojs environment for Node API class

Instructions

If you

  • run Mac OS X or Linux
  • have iojs installed ($ node -v prints v2.0.1)
  • can bulid binary Node packages (npm install ws doesn't fail)

then you can skip all the steps below.

Otherwise, do the following:

  1. Install VirtualBox
  2. Install Vagrant
  3. Create a folder, place Vagrantfile and setup.sh into it
  4. Execute vagrant up, it will take a while. Make sure that it prints v2.0.1 at the end.
  5. Run vagrant ssh and then inside the box run node -v. It should print v2.0.1
  6. Read about how to use Vagrant shared folders.

If you get stuck, contact me (andrew.listochkin on Skype)

sudo locale-gen UTF-8
echo '================================================='
echo 'Starting up...'
echo '================================================='
echo 'Updating packages...'
echo '================================================='
curl -sL https://deb.nodesource.com/setup_iojs_2.x | sudo bash -
echo '================================================='
echo 'Installing iojs-Latest...'
echo '================================================='
sudo apt-get install -y --force-yes build-essential iojs
node -v
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/trusty64"
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below,
# accessing "localhost:8080" will access port 80 on the guest machine.
config.vm.network "forwarded_port", guest: 80, host: 8080, auto_correct: true
config.vm.network "forwarded_port", guest: 3000, host: 3000, auto_correct: true
config.vm.provision "shell", path: "./setup.sh"
end
@mushtat
Copy link

mushtat commented Oct 23, 2014

Current version of Node.js is v0.10.32
And version v0.11.14 is marked as unstable. (http://blog.nodejs.org/2014/09/24/node-v0-11-14-unstable/)

Are you sure that we should use it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment