Your First Express App: Routes and JSON

Express turns each endpoint into one line that names its method and path, answers with res.json, and reads a JSON body from req.body once express.json() is switched on, so a small API takes a few lines instead of sixty.

By

Updated

Cheat sheet: Your First Express App: Routes and JSON
Category
Node.js
Level
Apprentice
Tags
201 Created, Express, express.json(), nodejs, res.json(), rest-api, Route in Express