如果我的路线/auth/token/:token
:token
是我的参数,是否仍然可以拥有路线/auth/token/exchange/:code
?
答案 0 :(得分:0)
是的,可以同时拥有两条路线
var express = require('express');
var app = express();
app.get("/auth/token/exchange/:token", function(req, res) {
res.send(req.params)
})
app.get("/auth/token/:token", function(req, res) {
res.send(req.params)
})
app.listen(4000, function() {
console.log("Express server listening on port 4000");
});