What you build
You will create the smallest useful backend for this track: one Express app with one route.
The route will answer GET / with JSON. This is the first proof that your API runs on your laptop and can later be shared in a public repo.
Remember this
An Express API is a Node app that listens for HTTP requests and sends responses.
A route connects one HTTP method and one path to one handler function. For example, GET / runs when someone opens the root URL.
Create the project
Do each one yourself, then tap it to tick it off. The ticks are only a checklist for you: they are not marked or scored.
0 of 5 done
node -v
npm init -y
npm install express
mkdir srcFirst route
Put this in src/app.js.
This uses app.get('/', handler). The get part is the HTTP method. The '/' part is the path. Query strings are not part of the route path; you will handle them in a later lesson.
import express from 'express';
const app = express();
const port = 3000;
app.get('/', (req, res) => {
res.json({
message: 'Recruiter-ready API is running',
owner: 'Your Name',
status: 'ok'
});
});
app.listen(port, () => {
console.log(`API listening on http://localhost:${port}`);
});Make imports work
Do each one yourself, then tap it to tick it off. The ticks are only a checklist for you: they are not marked or scored.
0 of 3 done
{
"type": "module",
"scripts": {
"dev": "node src/app.js"
},
"dependencies": {
"express": "^5.2.1"
}
}Test like a user
Run npm run dev. Then open http://localhost:3000 in your browser.
You should see JSON, not an HTML page. This is normal for an API. Later, your frontend, Postman, curl, or a recruiter’s local machine can call the same route.
npm run devAvoid old syntax
Older tutorials may show Express 4 patterns. Do not copy response shortcuts like res.json(obj, status) or res.send(body, status).
In Express 5, set the status first when you need one: res.status(201).json(data). For today, the default 200 response is fine.
Do this now
Do each one yourself, then tap it to tick it off. The ticks are only a checklist for you: they are not marked or scored.
0 of 5 done