node 中 get怎么写传参函数
http://demo.com/todos/id/56fbc659ebcb7d00519d6967
列出这个id下的数据
要实现这样的url函数要怎么写
//这样是指向http://demo.com/todos/
router.get('/', function(req, res, next) {
});
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
看样子你用的可能是
express,那你怎么着也应该这么写:修正,经@e10101 提示,你的根路径就是
/todos,那么我的答案就要改了。答案一致看文档:params