Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion lcowebserver/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -32,4 +37,4 @@ app.post('/postform', (req, res) => {

app.listen(port, () => {
console.log(`Example app listening at http://localhost:${port}`)
})
})