- On each day, create a new branch of this repository with the date
- e.g.,
11-22-2018
- e.g.,
- Create a JS folder with the same date name
- e.g.,
11-22-2018/
- e.g.,
- Follow the instructions below in that folder
- Timebox this to 1 hour
- Create a PR from that branch to master
Before You Start ... complete the daily warm-up
The goal for this exercise is to build up muscle memory on basic server setup and operations. You'll be tasked with creating servers many times during your career and in projects. This should be the type of thing that you can construct nearly blindfolded, to give yourself a stable starting point from which to do your actual work.
- Build an express web server. From Scratch. By Hand.
- Listens on
process.env.PORT
1 - Serves static files from a folder called
./public
2 - Has a separate
routes.js
file for serving custom routes - Handles 404's6 by serving the user a a custom page (.ejs5)
- Handles Errors7 by serving the user a custom page (.ejs5)
- log the actual error to the console
- Deploy to Heroku, via your master branch
- Write tests for each route, the 404 page, and a simulated error
- Use supertest
- Confirm tests passing at Travis, via the master branch