-
Notifications
You must be signed in to change notification settings - Fork 0
Project setup
The following page details the necessary steps to run the Quo server:
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.
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.
- 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
). - Right click anywhere in the Project Explorer, choose
Import...
, thenProjects from Git
- Click
Clone
then fill in the necessary fields, using the http method for the clone (Note: replaceusername
with your git username): "https://username@github.com/dondi/quo.git" - Follow the chain of
Next
windows until you can clickFinish
. Once you see the cloned git repository, you can click on it and create a general project from it. - Now, it is located in your Project Explorer for you to work!
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.
- 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" - 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
- 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)
- 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.
- 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!