/mean-exercises

Exercises for the MEAN January 2015 Course

Primary LanguageJavaScript

MEAN Course Exercises

Exercises for the MEAN January 2015 Course.

Introduction

Two of the quickest ways to get good at coding are experience and feedback.

These exercises aim to help you fulfill these goals. As you go along in the course and learn more, you will be given exercises to help reinforce the concepts that you are learning in class. You will need to be able to do the following to be successful in these exercises:

  1. Use git/GitHub, either through the CLI, WebStorm, or SourceTree GUI.
  2. Understand design specs and write code to achieve them.
  3. Use the appropriate tools to run and test your code.
    • Initially, you will be writing vanilla JavaScript and can use a NodeJS Run Configuration in WebStorm, or just the Chrome Console.
    • As the course gets more challenging, you will have to use CLI tools like grunt and nodemon to run/test your app.

Setup Instructions

To get started with your exercises, first make sure that you have a free GitHub account and that you are signed in. Then,

  • Fork this repo (Fork == copy it) by pressing the 'Fork' button in the upper right.
  • Copy the 'HTTPS clone URL' by pressing the button on the lower right. The repo URL should now be on your clipboard. It should be something like: https://github.com/<your username>/mean-exercises.git.
  • Go to your terminal, navigate to your development directory* and clone your repo by typing git clone <paste the repo URL here>.
    • On a Mac you can paste into the terminal by pressing command C
  • This will create a folder called mean-exercises. You can go into the folder by typing cd mean-exercises.
  • You can now open this project by:
    • Opening WebStorm, and selecting File > New Project from Existing Files.
    • Select 'Source files are in a local directory, no Web server is yet configured'.
    • Navigate to the mean-exercises directory and mark it as Project Root. (the WS icon)
    • Click finish.
  • Make sure to create a folder for each new exercise.

*Note: Your development directory can be anywhere you want -- Documents, Desktop, etc. Just create a folder so you can organize all of your dev stuff in one place.

How to Submit

You will submit your code to be reviewed by committing your changes through git, and then pushing to your own repo that you forked. Your code will be code reviewed to give you the necessary feedback so that you can learn best practices.

Appendix: Resyncing your fork with this repo

Every once and a while, this repo will be updated with exercises, errata, and other information. You will want these changes in your own forked repo so that you can continue working on exercises. To do this, you have to resync your repo with this repo.

The following commands explain how to do this:

# add a remote called 'upstream' that points to the original repo:
git remote add upstream https://github.com/CodingCampus/mean-exercises.git

# Fetch all the branches of that remote into remote-tracking branches,
# such as upstream/master:

git fetch upstream

# Make sure that you're on your own repo's master branch:

git checkout master

# Rewrite your master branch so that any commits of yours that
# aren't already in upstream/master are replayed on top of that
# other branch:

git rebase upstream/master

# Force push your updated repo to your github remote repo
git push -f origin master

See Stack Overflow answer