2017年3月22日 星期三

[Node.js] “Middleware” create by myself

Open “Middleware” for myself.

use() is a way to include "Middleware".

app.use(function(req, res, next) {
    // output string to web browser
    res.send("Insert text before content.");

    // take control permission to the next "Middleware"
    next();
});

0 意見:

張貼留言