Skip to content

jackfan00/nodejs-express-mongoose-rwd-learning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nodejs-express-mongoose-rwd-learning

  1. enviroment: CentOS 6.8

  2. 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"
    
  3. 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
    
  4. npm install mongoose --save (nodejs mongoDB driver)

  5. 程式功能解說:

       - 中文小說網站 
       - 提供作家自由上傳作品 
       - 書籍排行分類: 點擊 推薦 收藏 新書 更新 
       - 讀者功能:書架收藏 閱讀紀錄 書籍推薦投票 書籍評論 書籍搜尋
       - 版面安排:手機閱讀優先 閱讀字體大小自由調整 
    
  6. 程式碼:

       - routes/index.js, views/*.pug: 主要網站功能
       - routes/author.js, views/forauthor/*.pug: 作家相關網站功能
    

About

learn nodejs to build a rwd web-site

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages