Express 格式化输出HTML

Express 4.X

if (app.get('env') === 'development') {
    app.locals.pretty = true;
}

Express 3.X

app.configure('development', function(){
    app.use(express.errorHandler());
    app.locals.pretty = true;
});

Express 2.X

app.configure('development', function(){
    app.use(express.errorHandler());
    app.set('view options', { pretty: true });
});

友情链接:查看原文

posted @ 2016-06-13 21:10  MangoNiki  阅读(389)  评论(0编辑  收藏  举报