There is some code:
app.get(/^\/test\?sid$/, function (req, res) {
console.log('sid: ', req.params[0]);
res.sendfile(__dirname + '/public/login/index.html');
});
output:
Cannot GET /test?sid
Express's router matches against the pathname only, not the whole URL including the query string.
Since there's no capturing group in your regex, req.params
isn't going to be set.