WebFund 2013W: Task 2

From Soma-notes
Jump to navigation Jump to search

Your task for this set of tutorials are as follows:

  • Choose a partner or partners, form a team.
  • Setup a team in github with the help of a TA or instructor.
  • Try the tutorial for making a simple blog. The tutorial is here.

Simple Blog tutorial

The tutorial needs administrative access. In the lab, you can go to VirtualBox, run the COMP 3004 VM, and login as user "admin" with the password "nimda!".

Do not expect to understand much of what you will be doing in this tutorial at first. We will be explaining pieces of this code in the upcoming weeks. Think of this more as a way to see what a simple node web application will look like.

This tutorial is against an older version of the packages. A working version with bugs fixed, including all the functionality up to the comments part (i.e., in includes basic MondoDB functionality) is here. To get it running in the lab VMs do the following commands.

To get node and mongo DB installed:

sudo apt-get install python-software-properties python g++ make
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs npm nodejs-dev mongodb
sudo npm install express -g  # from the tutorial

Then:

wget http://homeostasis.scs.carleton.ca/~soma/webfund-2013w/blog.zip
unzip blog.zip
cd blog.zip
npm install -d
node simple-express.js

This should get you hello world on localhost:3000.

To run the in-memory version, run:

node app-memory.js

To run the mondo DB version:

node app-mondo.js

These are on localhost:3002 by default.

Good luck!