fixed example/express3.js
This commit is contained in:
parent
bb5dc8c803
commit
3f8bff0811
@ -4,7 +4,7 @@ const express = require('express');
|
|||||||
const bodyParser = require('body-parser');
|
const bodyParser = require('body-parser');
|
||||||
const app = express();
|
const app = express();
|
||||||
|
|
||||||
app.use(bodyParser.json());
|
app.use(bodyParser.json()); // before request handlers
|
||||||
|
|
||||||
app.get('/api/tasks', getTasks);
|
app.get('/api/tasks', getTasks);
|
||||||
app.post('/api/tasks', saveTask);
|
app.post('/api/tasks', saveTask);
|
||||||
|
Loading…
Reference in New Issue
Block a user