📜  express() 与 express.router() - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:04.094000             🧑  作者: Mango

代码示例4
var express = require('express');

var router = express.Router();

router.get('/', function(req, res) {
    res.send('GET handler for /dogs route.');
});

router.post('/', function(req, res) {
    res.send('POST handler for /dogs route.');
});

module.exports = router;