Skip to content

bhazzard/sketchwithus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Setting up

This guide is written assuming you are developing on Ubuntu. The first step is to install everything we need to run node.js:

sudo add-apt-repository ppa:chris-lea/node.js -y
sudo apt-get update -y
sudo apt-get upgrade -y
sudo apt-get install build-essential python-software-properties libssl-dev libreadline-dev git-core curl libcairo2-dev -y
sudo apt-get install nodejs nodejs-dev

Next, install NPM:

git clone git://github.com/isaacs/npm.git
cd npm
sudo make install

That's it!

Monitoring

Wherever you have the code checked out run:

sudo ./install.sh

This will configure scripts for upstart and monit. At this point the site should already be running. To test monit:

ps aux | grep node

Note the process ID for sketchwithus...

kill -9 PID

Then wait 15 seconds and sketchwithus should start up again:

watch -n 1 "ps aux | grep node"

Within 15 seconds, node should pop up into the list.

Getting started

Check out the code:

git clone [email protected]:mdellanoce/sketchwithus.git

Install the packages:

cd sketchwithus
npm install

Run the app:

node app.js --sketchpad --image

Modify your hosts file:

127.0.0.1       sketchwith.us

Point your browser to http://sketchwith.us:8000 Click the Start Sketchin' link, and start drawing.

Optionally, open another browser instance and point it to the same location as the first browser. Draw on the canvas, your drawing should show up in the other browser window in real-time.

Using Vagrant

Follow the vagrant setup instructions for your platform. Check out the code:

git clone [email protected]:mdellanoce/sketchwithus.git

Vagrant will attempt to download the cookbooks automatically. If you are running vagrant on Windows this won't work. You'll need to modify the Vagrantfile to load the cookbooks from the "cookbooks" path instead, then grab the Chef cookbooks from Github:

cd sketchwithus
git clone [email protected]:mdellanoce/cookbooks.git

Boot the VM:

vagrant up

Login to the VM. If you are running vagrant on windows, see vagrant-putty:

vagrant ssh

The project is mounted at /vagrant in the VM. For reasons that I don't understand, you will not be able to run npm install from /vagrant (something about it being a shared folder). So the recommended workflow is to make code changes on the host and run the app from the guest so that you know you are running on a production-like environment.

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •