9
我想爲主頁面和管理頁面使用2個佈局
我應該如何配置我的代碼來做到這一點?
這裏是我當前的代碼配置在expressjs中的佈局
app.configure(function(){
app.set('views', __dirname + '/views');
app.set('view engine', 'jade');
app.use(express.bodyParser());
app.use(express.methodOverride());
app.use(require('stylus').middleware({ src: __dirname + '/public' }));
app.use(express.static(__dirname + '/public'));
app.use(express.cookieParser());
app.use(express.session({secret: 'secrect', store: MemStore({
reapInterval: 60000 * 10
})}));
app.use(app.router);
});
謝謝alessioalex – 2012-01-09 16:05:35
http://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work:P – alessioalex 2012-01-09 16:27:48
expressjs.com鏈接不再轉到佈局。 – chovy 2012-09-16 23:19:06