Commit 7abf463d authored by james's avatar james

[ADD] init

parent dcdf1ab6
...@@ -2,6 +2,13 @@ const express = require('express') ...@@ -2,6 +2,13 @@ const express = require('express')
const app = express() const app = express()
const port = 3000 const port = 3000
// parse requests of content-type - application/json
app.use(express.json()); /* bodyParser.json() is deprecated */
// parse requests of content-type - application/x-www-form-urlencoded
app.use(express.urlencoded({ extended: true })); /* bodyParser.urlencoded() is deprecated */
app.get('/', (req, res) => { app.get('/', (req, res) => {
res.send('Hello World! (get') res.send('Hello World! (get')
}) })
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment