Command Shift

Further Backend

This week we will be creating an Express API that allows users to create accounts, list books and request to loan other users' books.

While we will provide guidance on how to tackle the different aspects of the track, you are expected to work independently and expand this track's functionality as you work on your portfolio.

The track is divided into blocks which build on each other. This iterative approach is a reflection of how projects evolve in real life, from the discovery of requirements to deploying an application.

We provide a "solution" branch which might come in useful.

Some advice:

  • Do not jump ahead and do complete the work in the stages described
  • Avoid copy/pasting code examples from the track description - developer muscle memory is built by typing, typing often and, a lot of the time, typing things that have been typed before.
  • Take notes, make to-do lists, draw diagrams, and understand the work before starting to write any code. Remember that writing code is a way of completing a task, not the task in itself.
  • Be unflappable. Check work frequently, run your tests consistently, and address errors one at a time. Knowing how to read errors, interpret and address them is one the most valuable skills you can have as a developer.
  • Do not underestimate the track - this is complex stuff and you should be proud of all the progress you are making!
  • Commit/push your work frequently to GitHub

Learning Objectives

  1. Interpret User Stories and use them to plan work
  2. Setup an Express API using node-postgres, Sequelize, Mocha/Chai and Supertest for testing
  3. Use advanced Sequelize schema validation, error handling and establish complex relationships between database tables
  4. Refactor to use helpers and make code DRY

On this page