1. Ship Your First Express Route
4 min
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}`);
});