I’m kind of new to express and node.js, and I can’t figure out the difference between app.use and app.get. It seems like you can use both of them to send information. For example:

app.use("https://stackoverflow.com/",function(req, res,next) {
    res.send('Hello');
    next();
});

seems to be the same as this:

app.get("https://stackoverflow.com/", function (req,res) {
   res.send('Hello');
});

7 Answers
7

Leave a Reply

Your email address will not be published. Required fields are marked *