Skip to content

Commit

Permalink
Reading post body using Express
Browse files Browse the repository at this point in the history
  • Loading branch information
Aditya Kotamraju committed Jan 20, 2019
1 parent d0d2c3f commit 8d40f05
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion server.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
const express = require('express');
const bodyParser = require('body-parser');
const app = express();

app.use(bodyParser.urlencoded({extended: true}));

app.get('/', (req, res) => {
res.send('Hello from App Engine!');
});
Expand All @@ -14,5 +17,6 @@ app.listen(PORT, () => {
//Login WebService
app.get('/login', (req, res) => {

res.send('Implementing Login Service');
res.send(req.body);
// res.send('Implementing Login Service');
});

0 comments on commit 8d40f05

Please sign in to comment.