In Express.js, app.delete() registers handlers for HTTP DELETE requests on a path. A typical REST API uses it to remove a resource, for example DELETE /users/42.
It is one of Express’s app.METHOD() routing methods: only DELETE matches. GET or POST to the same URL need their own routes. Express runs on a Node.js server — browsers only send the DELETE request.
Syntax
Call app.delete in your Express.js app. Start with this line.
Required. Route path to match for DELETE. Strings match the whole path. Arrays match any listed path.
callback
Required. One or more handlers: (req, res, next) => { … }. Can call next('route') to skip remaining callbacks on this route.
Return Value
app.delete() returns the same application object (app), so chaining is possible. In real apps you almost always ignore the return value and register each route on its own line.
Express
// Chaining works, but is uncommon:
app.delete('/items/:id', remove).get('/items', list);
// Typical style — ignore the return value:
app.delete('/items/:id', remove);
app.get('/items', list);
Same param pattern.:id selects which note to remove.
Missing → 404.res.status(404).end() sends no body.
Success → 204.res.status(204).end() means “done, nothing to return”.
Use 200 when you need a body. Prefer example 2’s JSON style if the client must see what was deleted.
Compatibility
Runtime Support
app.delete() is an Express.js application method. It runs on a Node.js server (Express 5 needs Node.js 18+). Browsers do not execute it — they only send HTTP DELETE requests.
✓ Server · Express 4 & 5
app.delete()
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.delete()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 registers one or more handlers for HTTP DELETE requests on a path. Only DELETE matches — GET or POST to the same path need their own routes.
Common choices are 200 with a JSON body, 204 with no body, or 202 if deletion is accepted but finished later. Use 404 when the resource is missing.
Use a route parameter such as /users/:id and read req.params.id inside the handler.
No. Express 5 removed app.del(). Use app.delete() instead.
No. Express runs on a Node.js server. Browsers only send HTTP DELETE requests to your API.