diff --git a/lcowebserver/index.js b/lcowebserver/index.js index cc4f2ac..0bf119c 100644 --- a/lcowebserver/index.js +++ b/lcowebserver/index.js @@ -18,6 +18,11 @@ app.get('/get', (req, res) => { res.status(200).json({message: "Hello from learnCodeonline.in"}) }) +app.post('/', (req, res) => { + let myJson = req.body; // your JSON + + res.status(200).send(myJson); +}) app.post('/post', (req, res) => { let myJson = req.body; // your JSON @@ -32,4 +37,4 @@ app.post('/postform', (req, res) => { app.listen(port, () => { console.log(`Example app listening at http://localhost:${port}`) -}) \ No newline at end of file +})