- Fork this repo, and clone it into your
dev
folder on your local machine.
Your homework tonight is practice.
You must do this without any copy/paste at least 5 times.
- Create a directory to place a node project in.
- Use
npm
to create apackage.json
and installexpress
. - Add
node_modules
to a new.gitignore
file. - Make a new JavaScript file which creates a new express application.
- Create a public folder and configure Express to serve static assets.
- Add two routes to the express application. Use your imagination! Your routes can return anything you want.
- Use the browser to test that your routes display the correct data.
- Add an HTML page in your project which uses server side rendering.
- Make a route which returns JSON data.
- Use your JSON route from your server side rendered HTML page. (AJAX FTW)
- As you make code changes, frequently commit and push to GitHub.
- Once you've finished the assignment and pushed your work to GitHub, make a pull request from your fork to the original repo.
Note: the pull-request will not be merged as other student's work would conflict.