Skip to content

Commit 5317ebe

Browse files
authored
docs: app.del() with app.delete() in README example (#411)
The README pre-flight example used app.del() which has been deprecated since Express 4.x. Replaced it with the correct app.delete() method to align with current Express.js API and prevent confusion for new users.
1 parent ee714bd commit 5317ebe

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ var cors = require('cors')
150150
var app = express()
151151

152152
app.options('/products/:id', cors()) // preflight for DELETE
153-
app.del('/products/:id', cors(), function (req, res, next) {
153+
app.delete('/products/:id', cors(), function (req, res, next) {
154154
res.json({msg: 'Hello'})
155155
})
156156

0 commit comments

Comments
 (0)