No more waiting around for pull requests to be merged and published. No more forking repos just to fix that one tiny thing preventing your app from working.
router.route('/login/')
.post(function(req, res, next){
passport.authenticate('digest', function(err, user, info){
if(err) return console.log(err);
if(!user){
res.set('WWW-Authenticate', 'x'+info);
return res.send(401);
}
req.login(user, function(err){
if(err) return console.log(err);
res.redirect('/admin/');
});
})(req, res, next);
});
var mysql = require('mysql');
var connection = mysql.createConnection({
host : 'localhost',
user : 'root',
password : '',
database : '1047750'
});
connection.query(
'SELECT * FROM test',
function(err, result, fields){
console.log(err);
console.log(result);
}
);
connection.end();
/(привет)/ui
/(прив)|(здрав)|(здоров)|(здаров)/ui
/^(прив)|^(здрав)|^(здоров)|^(здаров)/ui