Skip to content

ProfAvery/node-box

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-box

Building a node-box

  1. Install VirtualBox 5.0.14 or later.
  2. Install Vagrant
  3. Install Git
  4. Open a shell prompt (on Windows, use Git Bash. You will probably need to right-click and choose Run as Administrator).
  5. Clone this repository
    • Command-Line: git clone https://github.com/ProfAvery/node-box.git
    • via GitHub Desktop: Click the Clone in Desktop button on the GitHub page
  6. (Optionally) Edit Vagrantfile
    • Set vb.memory explicitly if you don't want to use 1/4 of the available RAM
    • Enable vb.gui = true if you need to troubleshoot
  7. vagrant up (This may take a while)
  8. If installation was successful, you should see all 13 tests passed.
  9. Log in with vagrant ssh

Troubleshooting VirtualBox

If you want to use PuTTY on Windows

  1. See Connect to Your Vagrant Virtual Machine with PuTTY for instructions on connecting.
  2. Once you are able to connect successfully, see PuTTY: How to load, save or delete server connection settings to save your connection information.
  3. Finally, to fix the line drawing characters used by NPM, see PuTTY, TMUX and NPM

Shared directories

  • The repository will be shared as /vagrant
  • The shared subdirectory will be symlinked from ~vagrant/shared

Additional configuration details

  • The username and password are both vagrant
  • Ports will be forwarded from the host machine as follows:
Host port Guest port
3000 3000
4040 4040
8000 80
8080 8080

Starting NoSQL databases

Redis and MongoDB servers and command-line clients are installed but not configured to start automatically.

Redis

Open a new ssh session and run

$HOME/redis/src/redis-server

MongoDB

Open a new ssh session and run

$HOME/mongodb/bin/mongod --dbpath=$HOME/mongodb/data

Shutting down

To stop Redis or MongoDB, press Ctrl-C in the terminal window where the database is running.

When you are finished, you can stop the VM by running

    vagrant suspend

or

    vagrant halt

If you want to destroy and re-build the machine completely, run

    vagrant destroy

but make sure that any data you want to save has been copied to ~vagrant/shared first

About

CPSC 473: Vagrant VM for Node.js development

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published