📜  nodejs 版本 api - Javascript 代码示例

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

代码示例1
import * as express from 'express';

// v1/get-ride.js
const router = express.Router();
router.post('/rides/:id', dep.verifyToken(), (req, res) => {
    // Your code
});
app.use('/v1', router);


// v2/get-ride.js
const router = express.Router();
router.post('/rides/:id', dep.verifyToken(), (req, res) => {
    // Your code
});
app.use('/v2', router);