app.METHOD() is the Express pattern for HTTP verb routes. Replace METHOD with a lowercase verb: app.get(), app.post(), app.put(), app.delete(), and many others.
Each call matches one verb on a path. Shared logic for every verb belongs on app.all(). Chain several verbs on one path with app.route().
Syntax
Call app.METHOD in your Express.js app. Start with this line.
GET /book → Get a book
POST /book → Add a book
PUT /book → Update the book
How It Works
One path.app.route('/book') names the resource once.
Chain verbs..get, .post, and .put are METHOD helpers on that route.
Same matching rules. Each link still matches only its HTTP verb.
Fewer typos. You do not repeat '/book' on every line.
Compatibility
Runtime Support
app.METHOD() helpers are Express.js application methods. They run on a Node.js server (Express 5 needs Node.js 18+). Browsers only send HTTP requests.
✓ Server · Express 4 & 5
app.METHOD()
Works wherever Express runs: Node.js is the primary target. Bun and Deno can run many Express apps with compatibility layers.
ServerNode.js runtime API
Node.js18+ for Express 5 · 14+ typical for Express 4
Supported
BunExpress-compatible server apps
Supported
DenoVia npm compatibility / adapters
Supported
app.METHOD()Express on Node.js
Bottom line: Study and run these examples with Node.js and the express package. Copy a snippet into a local file and start the server with node.
Frequently Asked Questions
It is the family of routing methods where METHOD is an HTTP verb in lowercase — for example app.get(), app.post(), and app.delete(). Each one matches only that verb.
app.METHOD() matches one HTTP verb. app.all() runs for every verb on the path.
No. String patterns match the whole request path. app.get('/apple') matches /apple, not /apple/images. app.use() behaves differently.
Use bracket notation: app['m-search'](path, handler), because m-search is not a valid JavaScript property name with dot syntax.
No. These methods register routes on your Node.js server. Browsers only send HTTP requests with a method and path.