node.js開發部落格系統前端項目搭建(一)

來源:互聯網
上載者:User

標籤:mac   jquery   query   log   mongod   開啟   content   技術   部落格   

Express: https://github.com/petecoop/generator-express

安裝node.js和npm

執行:

npm install -g yo
npm install -g generator-express

  執行:yo

建立項目成功。

項目的目錄:

brew安裝:MongoDb

http://blog.csdn.net/moumaobuchiyu/article/details/54885306

http://www.cnblogs.com/junqilian/p/4109580.html

出現這個錯誤:(沒有安裝mongodb)

用brew安裝mongodb:

brew install mongodb

mac建立檔案夾的命令:

sudo mkdir -p /data/db

  添加可讀可寫的許可權:

chown `id -u` /data/db

  執行命令:

mongod

 在開啟一個終端:

mongo

  指定目錄執行:

gulp

  安裝bootstrap:

bower install bootstrap --save 
引入bootstrap:
doctype htmlhtml(lang=‘en‘)headmeta(charset=‘UTF-8‘)meta(name=‘viewport‘, content=‘width=device-width‘)title= titleblock csslink(rel=‘stylesheet‘, href=‘components/bootstrap/dist/css/bootstrap.css‘)link(rel=‘stylesheet‘, href=‘/css/style.css‘)block jsscript(src=‘/components/jquery/dist/jquery.js‘)script(src=‘/components/bootstrap/dist/js/bootstrap.js‘)if ENV_DEVELOPMENTscript(src=‘http://localhost:35729/livereload.js‘)bodyblock content

node.js開發部落格系統前端項目搭建(一)

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.