Skip to content
dondi edited this page Jun 24, 2012 · 7 revisions

The following page details the necessary steps to run the Quo server:

Node

To set-up node.js, please consult the documentation listed here for your particular operating system. Note: Windows development is not supported for this project as the Express framework cannot operate. Macs can enjoy the all-inclusive node / npm binary listed on the above page.

Node Dependencies

The present project uses some third-party node dependencies that can be configured after node has been successfully set up:

Firstly, you must install node package manager (npm) as illustrated on step 4 of the above node installation tutorial. Once npm is set up, run the following commands:

cd ~ # Or wherever you would like node_modules to go.
npm install express jade mysql sechash validator everyauth

Set/export the NODE_PATH variable if you would like these dependencies to go somewhere other than your home directory.

Cloning the source

  1. If you're using Eclipse as your IDE but do not have the latest version, you can install the eGit plugin via the Indigo package (Install New Software -> Indigo -> Collaboration -> Eclipse EGit).
  2. Right click anywhere in the Project Explorer, choose Import..., then Projects from Git
  3. Click Clone then fill in the necessary fields, using the http method for the clone (Note: replace username with your git username): "https://username@github.com/dondi/quo.git"
  4. Follow the chain of Next windows until you can click Finish. Once you see the cloned git repository, you can click on it and create a general project from it.
  5. Now, it is located in your Project Explorer for you to work!

Running the application

Before running the application for the first time, set the following environment variables through whatever way you prefer (sorry, this wiki is not the place for talking about how environment variables should be set):

QUO_DB_SERVER   # The database server to which Quo should connect.
QUO_DB_USER     # The database user for the Quo database.
QUO_DB_PASS     # The above user's password for the Quo database.
QUO_TWIT_KEY    # The Twitter consumer key for the Twitter app that Quo should use.
QUO_TWIT_SECRET # The Twitter secret for the Twitter app that Quo should use.
  1. To run the node server, navigate to "src/main" within Quo, then type node app.js -- Successful server setup will display "Express server listening on port 4000 in development mode"
  2. To view the running server, open a web browser (not IE LOL) then navigate to localhost:4000 -- On other computers, you can get the IP of the host computer, then append :4000 to access the page

Pulling and Pushing

  1. Before you start any coding session, make sure no one has been working on the project by doing a git pull (for eclipse users, right click on the Quo project in your project explorer, then navigate to Team -> Pull)
  2. When you've done work locally and you're ready to commit to your local clone of the repository, do a git commit (for eclipse users, right click on the Quo project in your project explorer, then navigate to Team -> Commit). Make sure you add a descriptive commit message for what you did.
  3. Once you're ready to push your changes to the central repository, do a git push (for Eclipse users, right click on the Quo project in your project explorer, then navigate to Team -> Push).

Happy coding! Don't break anything!

Clone this wiki locally