app.post is not documented in expressjs.com. As I understand, the server listens to a url requestion / etc. which then invokes a middleware and a callback. But all this is same in app.get.
What unique value does it provide to express?
PS. There are other questions like Express Framework app.post and app.get, or app.use and app.get (or app.post) node.js express but reading answers to the same does not provide the answer to teh question.
Edit:
The following code provides for invocation of both app.get and app.post on /login request from the browswer. Are both app.get and app.post invoked? (Presumably in the order of appearance. )
app.get('/login', function(req, res){
var username = req.user ? req.user.username : ''; res.render('login', { title: 'authenticate', username: username,
});
message: req.flash('error') });
app.post('/login',
passport.authenticate('local', { failureRedirect: '/login', failureFlash: true }), function(req, res) {
res.redirect('/admin'); });
enter code here