像这样:
routes.get("/link/*", getLinkAndParams);
示例:-
router.get("/link/:id/*", getLinkAndParams);
exports.getLinkAndParams = async (req, res) => {
const id = req.params.id;
const rest = req.params[0]; // the rest of the path and query string will be captured in this variable
console.log(`id: ${id}`);
console.log(`rest: ${rest}`);
// ...
};