用的是express,我想匹配 /x 和 /x下的所有普页面,该怎么匹配?
现在写的分开两个 /x 和 /x/*, 这样看起来很奇怪。
写成了正则,不知好不好
app.get(/^\/x(\/.*)?/, function (req, res){
...
});
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
你可以这样。。