Express-Application

  • 一,app.mountpath
  • 二,app.on('mount', callback(parent))
  • 三,app.all(path, callback [, callback ...])
  • 四,app.delete(path, callback [, callback ...])
  • 五,app.disable(name)+app.disable(name)+app.enable(name)+app.enabled(name)
  • 六,app.get(name)
  • 七,app.get(path, callback [, callback ...])

一,app.mountpath

Express-Application_第1张图片

二,app.on(‘mount’, callback(parent))

Express-Application_第2张图片

三,app.all(path, callback [, callback …])

Express-Application_第3张图片

四,app.delete(path, callback [, callback …])

app.delete('/', function (req, res) {
  res.send('DELETE request to homepage')
})

五,app.disable(name)+app.disable(name)+app.enable(name)+app.enabled(name)

Express-Application_第4张图片
Express-Application_第5张图片
Express-Application_第6张图片

六,app.get(name)

app.get('/', function (req, res) {
  res.send('GET request to homepage')
})

七,app.get(path, callback [, callback …])

//Routes HTTP GET requests
app.get('/', function (req, res) {
  res.send('GET request to homepage')
})

你可能感兴趣的:(Node,node.js)