You will need node v0.9.12, v7.4.0, and python 2.7.
To take care of the different node versions, use a node version manager such as nvm. This is what I'll use in both sections.
Install Homebrew and nvm on your own if you don't already have it.
## Terminal
### Set up the project directory!
~/anywhere $ brew install redis
~/path/to-contain-project $ git clone <giturl>
~/path/to-contain-project $ cd <foldername>
### Setup Python stuffs!
~/path/to/my-workspaces $ virtualenv env (anything works, of course)
~/path/to/my-workspaces $ env/bin/pip install -r requirements.txt
### Setup Node stuffs!
(nvm install node installs the latest version of node which
we need to install dependencies)
~/path/to/my-workspaces $ cd chat
~/path/to/my-workspaces/chat $ nvm install node && nvm install 0.9
~/path/to/my-workspaces/chat $ nvm use node && npm install (or yarn)
Same as above except you don't have pip installed with Python by default, you don't have (and don't use) Homebrew, and the redis package we need is called redis-server in apt. Just run the three following commands, and then start from the top of Mac.
## Terminal
sudo apt-get upgrade && sudo apt-get update
sudo apt-get install python-pip
sudo apt-get install redis-server
Running is the same on both OS X and Linux. The syntax used here assumes that you followed the above instructions. Make sure you start redis-server before you run chat_server.js.
## Terminal 1 - Django instance
~/path/to/my-workspaces $ source env/bin/activate
~/path/to/my-workspaces $ python app/manage.py runserver 3000
## Terminal 2 - Redis instance
~/anywhere $ redis-server
## Terminal 3 - Node server instance
~/path/to/my-workspaces/chat $ nvm use 0.9
~/path/to/my-workspaces/chat $ node chat_server.js
| username | password |
|---|---|
| cnguyen | temp1234 |
| bobby | test1234 |
| jeremy | temp1234 |