nodejs路由的部分通配

Posted 边直直

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了nodejs路由的部分通配相关的知识,希望对你有一定的参考价值。

1. 占位标识符/:id

app.get(\'/post_api_post_data_ren/bet/follow/:gameEn\',function(req,res){
    console.log(req.params.gameEn);
});
//eg:请求的路由为 http://localhost/post_api_post_data_ren/bet/follow/jxD11

 

以上是关于nodejs路由的部分通配的主要内容,如果未能解决你的问题,请参考以下文章