diff --git a/README.md b/README.md index 1a70088..399ec99 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ const server = createServer(app) app.use(bodyParser()) -app.get('/', (req, res) => { +app.get('/', ({ res }) => { res.set('Content-Type', 'text/html; charset=utf-8') .send(`
@@ -33,7 +33,7 @@ app.get('/', (req, res) => { `) }) -app.post('/file', (req, res) => { +app.post('/file', ({ req, res }) => { const file = req.body.file // file sent with name "file" res.sendFile(file.filepath, file.filename, file.mimetype) })