[Course] API design in Node with Express v3
[!NOTE] This repo is from an archived version of the course. Watch the latest version of the course on frontendmasters.com.
Scott Moss & Frontend Masters
This course has two parts, slides and excercises. The slides describe the excerices in detail. Each excercise has a starting branch and solution branch. Example lesson-1
and lesson-1-solution
.
lesson-1
In this lesson you'll be creating a simple Express based API in node, just to get your feet wet.
lesson-2
yarn test-routes
or npm run test-routes
This exercise will have you creating routes and sub routers for our soon the be DB resources using Express routing and routers
lesson-3
yarn test-models
or npm run test-models
In this exercise, you'll be taking what you learned about Mongoose and MongoDb to create a schema and model for the Item resource.
lesson-4
yarn test-controllers
or npm run test-controllers
So far we have routes and models. Now we need to hook our routes up to our models so we can perfom CRUD on the models based on the routes + verbs. That's exactly what controllers do.
utils/crud.js
lesson-5
yarn test-auth
or npm run test-auth
In this exercise you'll be locking down our API using JWT's.
THe other resources don't have any test, go ahead and write some!