Express node.js 如何路由请求如下链接 求大神指教


刚刚学习 node.js 现在路由只会请求 这样的链接 www.baidu.com/a/1/b/2/c/3

但是像这样的www.baidu.com?a=1&b=2&c=3 该怎样请求

express.js node.js url

忧郁的触手 11 years, 1 month ago

 app.use('/', function (req, res) {
        var a = req.query.a;
        var b = req.query.b;
        var c = req.query.c;
    });

Tamakyi answered 11 years, 1 month ago

Your Answer