Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

route methods

// GET method route
app.get('/', (req, res) => {
  res.send('GET request to the homepage')
})

// POST method route
app.post('/', (req, res) => {
  res.send('POST request to the homepage')
})
Source by expressjs.com #
 
PREVIOUS NEXT
Tagged: #route #methods
ADD COMMENT
Topic
Name
6+3 =