Back-End Web APIs
Design REST routes, validate JSON, build Node and Express APIs on a SQL database, secure them, test them and ship them.
Leads to: Software Developer, Mobile Developer, Web / Full-Stack Developer, Back-End Developer, QA / Test Engineer
Before you start
This course builds on JavaScript Essentials, SQL Fundamentals and Git & the Command Line. Take them first if you are new to the topic.
About this course
An intermediate course for learners who can write JavaScript, query a SQL database and use Git, and now want to build the server side of an app. You will design REST routes and pick the right HTTP status codes, validate JSON request bodies, and set up a Node.js project with npm. You will then write Express routes and middleware, query a database safely from a route with parameterised SQL, and compare cookie sessions with tokens. The security module covers salted password hashing and the most common API flaws from the OWASP API Security Top 10, including broken access control and injection. The last module shows how to test routes with a request library, describe an API with OpenAPI, and deploy it to a free hosting tier without committing secrets. Every lesson has a reading, free videos and a quiz; most also have a JavaScript or SQL exercise checked automatically in the browser, or a guided project you do on your own machine. Prerequisites: JavaScript Essentials, SQL Fundamentals, and Git & the Command Line.
Course content
Module 1
HTTP and REST
3 lessons · 1h 38mDesign routes around resources and HTTP methods, choose the right status code for every outcome, and validate JSON request bodies.
- 19mREST resources and verbsReading
Design predictable API routes by naming resources in the URL and letting HTTP methods carry the action.
- 20mStatus codes and errorsReading
Pick the right HTTP status code for every outcome and return one consistent, safe error body.
- 59mJSON payloads and validationReading
Parse JSON request bodies and validate every field before your route uses it.
Module 2
Building with Node
3 lessons · 2h 41mSet up a Node.js project with npm, write Express routes and middleware, and query a SQL database safely from a route.
- 56mNode.js and npmReading
Run JavaScript on your computer with Node.js and manage packages, scripts and secrets with npm.
- 1h 10mRoutes and middlewareReading
Write Express route handlers and middleware, and understand how requests flow through them.
- 35mTalking to a databaseReading
Query a SQL database from a route with parameterised queries, joins and only the columns you need.
Module 3
Auth and Security
3 lessons · 1hKeep users logged in with cookie sessions or tokens, store passwords as salted slow hashes, and fix the most common API security flaws.
- 13mSessions, cookies, and tokensReading
Compare server sessions and tokens, and store them safely in cookies or secure storage.
- 18mPassword hashingReading
Explain why passwords are stored as salted, slow hashes and how to do it with a maintained library.
- 29mAPI security basicsReading
Recognise the most common API flaws from the OWASP API Security Top 10 and fix broken access control and injection.
Module 4
Testing and Shipping
3 lessons · 1h 52mTest routes with a request library, describe the API with OpenAPI, and deploy it to a free hosting tier.
- 31mAPI testsReading
Test routes through the real app with a request library, covering success, validation, auth and not-found cases.
- 43mDocumenting an APIReading
Describe routes, inputs, responses and errors in an OpenAPI document that people and tools can read.
- 38mDeploying an APIReading
Ship a Node API to a free hosting tier with environment-based config, a health check and no committed secrets.