Skip to content
masudio edited this page Mar 28, 2011 · 9 revisions

Welcome to the CourseProject wiki!

CPSC301 Winter 2011 Course Project

This project was started in a course called CPSC 301 - Large Scale Software Development, at the University of Calgary in Winter 2011. It's a course designed to throw us students into the deep end of development, and see what comes up. At the time of this writing, node.js is in it's infancy and was used as an underlying framework for the project. Combining students with cutting edge technology can be risky, but so far we've done a great job pulling things together and creating something great.

In following posts on this page, there will be directions on how to use the project if ever you decide to clone the repository, and we might even include the basics from how to set up a linux environment, to github setup, to adding code to the repository and contributing to the project.

Steps to running project using linux:

PART1

1.) Install linux on your computer if you haven't already Best installation option: http://www.ubuntu.com/desktop/get-ubuntu/download

2.) Install github (optional - only if you want to contribute to the project) Installation: https://github.com/plans -Choose Free Account, and follow the simple steps to get git and github setup on your linux machine

3.) Install node Best installation instructions: http://howtonode.org/how-to-install-nodejs

4.) Clone repository open a terminal window in (Ctrl+Alt+T in Ubuntu) -navigate to desired download directory -enter "git clone [email protected]:shaunph/CourseProject.git" and press enter

5.) After git finishes downloading, type: "cd CourseProject" then press enter "./runserver.sh " where port is the port number to use. e.g. "./runserver.sh 2345"

6.) The last command will install node-sqlite and other required files, and run the server. You'll know when it's done when you see the text "server listening on..." and another line Open a browser and type "127.0.0.1:" into the address bar and press enter to see the project

PART2

1.) Now you know how to run the site, but you want to run it with a database too. Go to the terminal and type "Ctrl+C" to kill the server -type "cd src" to enter the src folder -type "node js/createDatabase.js" to create a database to run behind the server -after it creates the 3 tables, type "node js/fixtures.js" (it'll take a minute to run)

2.) When the last command finishes, run the server again and navigate the pages to see the database info -type "cd .." then enter -type "./runserver.sh " -Checkout the website!

PART3 - Contributing to the project

In order to contribute, you must have step 2 in PART1 completed, and also go through a git tutorial if you haven't already: http://www.kernel.org/pub/software/scm/git/docs/gittutorial.html

1.) Fork a repository and submit some changes After logging into github, navigate to the CourseProject repository page, and click "Fork" at the top right. -Follow the prompts to fork your own repository, and then clone that onto your machine, and work in it. -When you like your changes, commit and push to your fork's mainline. -Then go to github and submit a "pull request" by clicking the button at the top right when in your fork's page -Then follow the prompts and wait for your code to be reviewed!