雪花台湾

基於 Node.js + Express + mongoDB + Bootstrap 搭建的電影網站

電影網站

? GitHub: https://github.com/bxm0927/movie-website

此項目是基於 Node.js + Express + mongoDB + Bootstrap 搭建的電影網站。

主要功能模塊:

<!-- more -->

圖片預覽

技術棧

【前端】

【後端】

【資料庫】

【自動化構建】

收穫

  1. 熟悉了 pug 的語法及其在 Node.js 中的使用方法,了解到 pug 的優缺點及如何取捨
  2. 初步掌握了 express 框架的使用,如何處理路由以及中間件
  3. 掌握了 mongoose 在 Node.js 中如何連接資料庫,以及 schema、model、entity 的使用
  4. 前後端數據傳遞與視圖展現的流程
  5. 學會了使用 bcryptjs(Node.js 的一個加解密模塊)對密碼進行 「hash + salt」 處理
  6. 藉助會話與 cookie 進行用戶識別和持久化

TODO

  1. 用戶登錄註冊未做表單校驗等等
  2. 全面 Promise 化
  3. 升級成 ejs 模版
  4. 電影評論功能的功能過於簡化
  5. 增加個人中心
  6. 前後台請求盡量使用 ajax 非同步獲取
  7. 還有很多...

Build Setup

# clone the repo into your disk.
$ git clone https://github.com/bxm0927/movie-website.git

# install dependencies
$ npm install

# run
$ npm start

# visit
$ http://localhost:3000/

License

The code is available under the MIT license.

Thanks

@Scott

推薦閱讀:

相关文章