2013-04-21 25 views
0

我完全是Express.js的初學者,我正嘗試使用Express,js,Jade和Less來構建一個簡單的網站。我創造了我的文件夾項目的方式是:帶有LESS的Express.js中的Bootrstrap:在public/lib /中包含bootstrap文件夾?

$ mkdir myProj 
$ cd myProj 
$ express --sessions --css less 

最近我聽說引導,我想將其包含在我的項目。我試圖找到如何添加和包括引導在線教程,我試圖做到這一點的方法是:

--> download bootstrap from the official page 
--> add the downloaded folder in public/lib/bootstrap 
--> include the css files in the layout.jade as follows: link(rel='stylesheet', href='/lib/bootstrap/css/bootstrap.css') 

至於我可以看到它正在工作。但我不確定這是否是在Express.js中引入bootstrap的正確方法。有沒有其他方法可以在Express.js中引入bootstrap,並且我的方式正確嗎?

+1

如果你想引導較少的文件從這裏下載 - > https://github.com/twitter/bootstrap – Behzadsh 2013-04-28 11:01:47

回答

0

這個怎麼樣?

$ npm install -g twitter-bootstrap-node 

# Create the project: (Default css engine is "less",And template engine is "jade") 

$ twitter-bootstrap project 
$ cd project 
$ node app.js 
相關問題