-
enviroment: CentOS 6.8
-
download necessary tools:
- nodejs: https://nodejs.org/, a. extract tar file , then edit ~/.bashrc , add "export PATH=$PATH:<nodejs-extract-directory>/bin" b. source ~/.bashrc - mongoDB: https://www.mongodb.com/download-center#community, select "RHEL6 linux 64-bit", a. extract tar file, then edit ~/.bashrc , add "export PATH=$PATH:<mongodb-extract-directory>/bin" b. source ~/.bashrc c. mkdir ./data/db d. mongod --dbpath=./data/db --rest e. check http://localhost:28017 - express-generator: "npm install express-generator -g"
-
create web-site page
- express --view=pug myapp - cd myapp - npm install (install dependence in the package.json) - DEBUG=myapp:* npm start (set DEBUG=myapp:* & npm start -- window command) - check http://localhost:3000
-
npm install mongoose --save (nodejs mongoDB driver)
-
程式功能解說:
- 中文小說網站 - 提供作家自由上傳作品 - 書籍排行分類: 點擊 推薦 收藏 新書 更新 - 讀者功能:書架收藏 閱讀紀錄 書籍推薦投票 書籍評論 書籍搜尋 - 版面安排:手機閱讀優先 閱讀字體大小自由調整
-
程式碼:
- routes/index.js, views/*.pug: 主要網站功能 - routes/author.js, views/forauthor/*.pug: 作家相關網站功能
-
Notifications
You must be signed in to change notification settings - Fork 0
jackfan00/nodejs-express-mongoose-rwd-learning
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
learn nodejs to build a rwd web-site
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published