1
我使用快遞,和玉寫我的看法。其中之一是一個index.jade文件,id像爲你提供這個文件一樣.html。我將如何做到這一點?我試圖res.sendfile('views/index.jade')
和res.sendfile('views/index.html')
我怎樣才能成爲一個index.jade?
謝謝!
我使用快遞,和玉寫我的看法。其中之一是一個index.jade文件,id像爲你提供這個文件一樣.html。我將如何做到這一點?我試圖res.sendfile('views/index.jade')
和res.sendfile('views/index.html')
我怎樣才能成爲一個index.jade?
謝謝!
呈現一個頁面,你需要使用
res.render('index');
啊我明白了,謝謝 – fancy 2012-03-08 01:16:26