Skip to content
Alex Yang edited this page Apr 7, 2015 · 15 revisions

#COGS 121 - Assignment 0 Due: Wednesday 4/8, 11:59pm

In this assignment, you will set up your local environment, go over the basic concepts of node.js, express framework, databases, and front end, and create an application that uses APIs from an external source.

##Before Starting

Create a github account (If you already have one, great!) http://github.com

Set up your programming environment:

Create a heroku account (If you already have one, great!) http://heroku.com/. You will need to link a credit card to it to use their databases (but as long as you use the free tier, you will never get charged).

##The Assignment

  1. Read through the slides here (from Week 1 Discussion): https://cloudup.com/cYvT7-sq5C7 NOTE: I made a mistake when creating the slide 'Database Setup', it should be MONGOLAB_URI and NOT MONGOLAB_URL
  2. Fork the code from this GitHub repository to your own github account https://github.com/COGS121/InstagramAppExample
  3. Setup the application.
    • Download the repository (git clone URL_HERE) and run npm install
    • Make sure to create a .env containing secret key/id fetched from Instagram
    • Make sure that mongo is running (usually by entering mongod in terminal/bash/cmd)
  4. Try out this application step by step.
    • For each slide, there will be a commit associated to it. To find the commit, go to https://github.com/COGS121/InstagramAppExample/commits/master and hover over the commit that you want. There will be a clipboard button. Click it. In the command line (git bash, terminal), type in git checkout and then paste. It will paste the hash value of the commit. Press enter and you will revert to that slide/commit.
  5. Once you are done, type git checkout master to get to the latest commit.
  6. Push your changes to Heroku.
    • You will need to create an .env file and save your secret keys to test locally.
    • Then, you will need to create an instance on heroku and push this web app onto heroku.
    • In addition you will need to push your secret keys to heroku. (Do not commit the secret keys!)
  7. Change the README and push to Github
    • Change your README file to contain: Assignment 0, Your name, Your partner’s name, COGS 121 SP15.
    • Commit and push to your own Github repository.

##Submission Guidelines: Follow the submission link and choose the assignment number that you are submitting (this is Assignment 0). Enter your PID. If you are working in a team of two, also enter your partner's PID in the spaces provided. Include a link to your heroku application, and a link to your github repository.

Submit here: http://tinyurl.com/c121a0turnin

Clone this wiki locally