{"id":13670279,"url":"https://github.com/18820227745/shop-demo-node","last_synced_at":"2025-04-27T09:32:14.871Z","repository":{"id":64716913,"uuid":"97776745","full_name":"18820227745/shop-demo-node","owner":"18820227745","description":"node.js+express+mongodb 小电商项目实战","archived":false,"fork":false,"pushed_at":"2017-07-20T02:56:46.000Z","size":2430,"stargazers_count":104,"open_issues_count":0,"forks_count":34,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-08-03T09:07:18.827Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/18820227745.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-07-20T01:28:33.000Z","updated_at":"2024-07-12T08:52:32.000Z","dependencies_parsed_at":"2022-12-14T22:36:30.822Z","dependency_job_id":null,"html_url":"https://github.com/18820227745/shop-demo-node","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/18820227745%2Fshop-demo-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/18820227745%2Fshop-demo-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/18820227745%2Fshop-demo-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/18820227745%2Fshop-demo-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/18820227745","download_url":"https://codeload.github.com/18820227745/shop-demo-node/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224067068,"owners_count":17250106,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T09:00:37.614Z","updated_at":"2024-11-11T07:31:20.336Z","avatar_url":"https://github.com/18820227745.png","language":"HTML","funding_links":[],"categories":["HTML"],"sub_categories":[],"readme":"## shop-demo-node\n\n使用 Express + MongoDB 的小电商实战项目\n\n## 开发环境\n\n- Node.js: `6.11.0`\n- MongoDB: `3.4.2`\n- Express: `3.4.8`\n\n## 目录\n\n- 开发环境搭建\n    - [Node.js 的安装与使用](https://github.com/18820227745/shop-demo-node/blob/master/book/1.1%20Node.js%20%E7%9A%84%E5%AE%89%E8%A3%85%E4%B8%8E%E4%BD%BF%E7%94%A8.md)\n        - [安装 Node.js](https://github.com/18820227745/shop-demo-node/blob/master/book/1.1%20Node.js%20%E7%9A%84%E5%AE%89%E8%A3%85%E4%B8%8E%E4%BD%BF%E7%94%A8.md#111-安装-nodejs)\n        - [n 和 nvm](https://github.com/18820227745/shop-demo-node/blob/master/book/1.1%20Node.js%20%E7%9A%84%E5%AE%89%E8%A3%85%E4%B8%8E%E4%BD%BF%E7%94%A8.md#112-n-和-nvm)\n        - [nrm](https://github.com/18820227745/shop-demo-node/blob/master/book/1.1%20Node.js%20%E7%9A%84%E5%AE%89%E8%A3%85%E4%B8%8E%E4%BD%BF%E7%94%A8.md#113-nrm)\n    - [MongoDB 的安装与使用](https://github.com/18820227745/shop-demo-node/blob/master/book/1.2%20MongoDB%20%E7%9A%84%E5%AE%89%E8%A3%85%E4%B8%8E%E4%BD%BF%E7%94%A8.md)\n        - [安装与启动 MongoDB](https://github.com/18820227745/shop-demo-node/blob/master/book/1.2%20MongoDB%20%E7%9A%84%E5%AE%89%E8%A3%85%E4%B8%8E%E4%BD%BF%E7%94%A8.md#121-安装与启动-mongodb)\n        - [Robomongo 和 MongoChef](https://github.com/18820227745/shop-demo-node/blob/master/book/1.2%20MongoDB%20%E7%9A%84%E5%AE%89%E8%A3%85%E4%B8%8E%E4%BD%BF%E7%94%A8.md#122-robomongo-和-mongochef)\n- Node.js 知识点讲解\n    - [require](https://github.com/18820227745/shop-demo-node/blob/master/book/2.1%20require.md)\n    - [exports 和 module.exports](https://github.com/18820227745/shop-demo-node/blob/master/book/2.2%20exports%20%E5%92%8C%20module.exports.md)\n    - [Promise](https://github.com/18820227745/shop-demo-node/blob/master/book/2.3%20Promise.md)\n    - [环境变量](https://github.com/18820227745/shop-demo-node/blob/master/book/2.4%20%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F.md)\n    - [packge.json](https://github.com/18820227745/shop-demo-node/blob/master/book/2.5%20package.json.md)\n        - [semver](https://github.com/18820227745/shop-demo-node/blob/master/book/2.5%20package.json.md#251-semver)\n    - [npm 使用注意事项](https://github.com/18820227745/shop-demo-node/blob/master/book/2.6%20npm%20%E4%BD%BF%E7%94%A8%E6%B3%A8%E6%84%8F%E4%BA%8B%E9%A1%B9.md)\n        - [npm init](https://github.com/18820227745/shop-demo-node/blob/master/book/2.6%20npm%20%E4%BD%BF%E7%94%A8%E6%B3%A8%E6%84%8F%E4%BA%8B%E9%A1%B9.md#261-npm-init)\n        - [npm install](https://github.com/18820227745/shop-demo-node/blob/master/book/2.6%20npm%20%E4%BD%BF%E7%94%A8%E6%B3%A8%E6%84%8F%E4%BA%8B%E9%A1%B9.md#262-npm-install)\n        - [npm scripts](https://github.com/18820227745/shop-demo-node/blob/master/book/2.6%20npm%20%E4%BD%BF%E7%94%A8%E6%B3%A8%E6%84%8F%E4%BA%8B%E9%A1%B9.md#263-npm-scripts)\n        - [npm shrinkwrap ](https://github.com/18820227745/shop-demo-node/blob/master/book/2.6%20npm%20%E4%BD%BF%E7%94%A8%E6%B3%A8%E6%84%8F%E4%BA%8B%E9%A1%B9.md#264-npm-shrinkwrap)\n- Hello, Express\n    - [初始化一个 Express 项目](https://github.com/18820227745/shop-demo-node/blob/master/book/3.1%20%E5%88%9D%E5%A7%8B%E5%8C%96%E4%B8%80%E4%B8%AA%20Express%20%E9%A1%B9%E7%9B%AE.md)\n        - [supervisor](https://github.com/18820227745/shop-demo-node/blob/master/book/3.1%20%E5%88%9D%E5%A7%8B%E5%8C%96%E4%B8%80%E4%B8%AA%20Express%20%E9%A1%B9%E7%9B%AE.md#311-supervisor)\n    - [路由](https://github.com/18820227745/shop-demo-node/blob/master/book/3.3%20%E6%A8%A1%E6%9D%BF%E5%BC%95%E6%93%8E.md)\n        - [express.Router](https://github.com/18820227745/shop-demo-node/blob/master/book/3.2%20%E8%B7%AF%E7%94%B1.md#321-expressrouter)\n    - [模板引擎](https://github.com/18820227745/shop-demo-node/blob/master/book/3.3%20%E6%A8%A1%E6%9D%BF%E5%BC%95%E6%93%8E.md)\n        - [ejs](https://github.com/18820227745/shop-demo-node/blob/master/book/3.3%20%E6%A8%A1%E6%9D%BF%E5%BC%95%E6%93%8E.md#331-ejs)\n        - [includes](https://github.com/18820227745/shop-demo-node/blob/master/book/3.3%20%E6%A8%A1%E6%9D%BF%E5%BC%95%E6%93%8E.md#332-includes)\n    - [Express 浅析](https://github.com/18820227745/shop-demo-node/blob/master/book/3.4%20Express%20%E6%B5%85%E6%9E%90.md)\n        - [中间件与 next](https://github.com/18820227745/shop-demo-node/blob/master/book/3.4%20Express%20%E6%B5%85%E6%9E%90.md#341-中间件与-next)\n        - [错误处理](https://github.com/18820227745/shop-demo-node/blob/master/book/3.4%20Express%20%E6%B5%85%E6%9E%90.md#342-错误处理)\n- 小电商项目实战\n    - [开发环境](https://github.com/18820227745/shop-demo-node/blob/master/book/4.1%20%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83.md)\n    - [准备工作](https://github.com/18820227745/shop-demo-node/blob/master/book/4.2%20%E5%87%86%E5%A4%87%E5%B7%A5%E4%BD%9C.md)\n        - [目录结构](https://github.com/18820227745/shop-demo-node/blob/master/book/4.2%20%E5%87%86%E5%A4%87%E5%B7%A5%E4%BD%9C.md#421-目录结构)\n        - [安装依赖模块](https://github.com/18820227745/shop-demo-node/blob/master/book/4.2%20%E5%87%86%E5%A4%87%E5%B7%A5%E4%BD%9C.md#422-安装依赖模块)\n    - [配置文件](https://github.com/18820227745/shop-demo-node/blob/master/book/4.3%20%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6.md)\n        - [config-lite](https://github.com/18820227745/shop-demo-node/blob/master/book/4.3%20%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6.md#431-config-lite)\n    - [功能设计](https://github.com/18820227745/shop-demo-node/blob/master/book/4.4%20%E5%8A%9F%E8%83%BD%E8%AE%BE%E8%AE%A1.md)\n        - [功能与路由设计](https://github.com/18820227745/shop-demo-node/blob/master/book/4.4%20%E5%8A%9F%E8%83%BD%E8%AE%BE%E8%AE%A1.md#441-功能与路由设计)\n        - [会话](https://github.com/18820227745/shop-demo-node/blob/master/book/4.4%20%E5%8A%9F%E8%83%BD%E8%AE%BE%E8%AE%A1.md#442-会话)\n        - [页面通知](https://github.com/18820227745/shop-demo-node/blob/master/book/4.4%20%E5%8A%9F%E8%83%BD%E8%AE%BE%E8%AE%A1.md#443-页面通知)\n        - [权限控制](https://github.com/18820227745/shop-demo-node/blob/master/book/4.4%20%E5%8A%9F%E8%83%BD%E8%AE%BE%E8%AE%A1.md#444-权限控制)\n    - [页面设计](https://github.com/18820227745/shop-demo-node/blob/master/book/4.5%20%E9%A1%B5%E9%9D%A2%E8%AE%BE%E8%AE%A1.md)\n    - [连接数据库](https://github.com/18820227745/shop-demo-node/blob/master/book/4.6%20%E8%BF%9E%E6%8E%A5%E6%95%B0%E6%8D%AE%E5%BA%93.md)\n        - [为什么使用 Mongoose](https://github.com/18820227745/shop-demo-node/blob/master/book/4.6%20%E8%BF%9E%E6%8E%A5%E6%95%B0%E6%8D%AE%E5%BA%93.md#461-为什么使用-mongoose)\n    - [注册](https://github.com/18820227745/shop-demo-node/blob/master/book/4.7%20%E6%B3%A8%E5%86%8C.md)\n        - [用户模型设计](https://github.com/18820227745/shop-demo-node/blob/master/book/4.7%20%E6%B3%A8%E5%86%8C.md#471-用户模型设计)\n        - [注册页](https://github.com/18820227745/shop-demo-node/blob/master/book/4.7%20%E6%B3%A8%E5%86%8C.md#472-注册页)\n    - [登出与登录](https://github.com/18820227745/shop-demo-node/blob/master/book/4.8%20%E7%99%BB%E5%87%BA%E4%B8%8E%E7%99%BB%E5%BD%95.md)\n        - [登出](https://github.com/18820227745/shop-demo-node/blob/master/book/4.8%20%E7%99%BB%E5%87%BA%E4%B8%8E%E7%99%BB%E5%BD%95.md#481-登出)\n        - [登录页](https://github.com/18820227745/shop-demo-node/blob/master/book/4.8%20%E7%99%BB%E5%87%BA%E4%B8%8E%E7%99%BB%E5%BD%95.md#481-登出)\n        - [登录](https://github.com/18820227745/shop-demo-node/blob/master/book/4.8%20%E7%99%BB%E5%87%BA%E4%B8%8E%E7%99%BB%E5%BD%95.md#481-登出)\n    - [添加商品](https://github.com/18820227745/shop-demo-node/blob/master/book/4.9%20%E6%B7%BB%E5%8A%A0%E5%95%86%E5%93%81.md)\n        - [商品模型设计](https://github.com/18820227745/shop-demo-node/blob/master/book/4.9%20%E6%B7%BB%E5%8A%A0%E5%95%86%E5%93%81.md)\n        - [浏览商品](https://github.com/18820227745/shop-demo-node/blob/master/book/4.9%20%E6%B7%BB%E5%8A%A0%E5%95%86%E5%93%81.md#492-浏览商品)\n        - [添加商品](https://github.com/18820227745/shop-demo-node/blob/master/book/4.9%20%E6%B7%BB%E5%8A%A0%E5%95%86%E5%93%81.md#493-添加商品)\n    - [购物车](https://github.com/18820227745/shop-demo-node/blob/master/book/4.10%20%E8%B4%AD%E7%89%A9%E8%BD%A6.md)\n        - [购物车模型设计](https://github.com/18820227745/shop-demo-node/blob/master/book/4.10%20%E8%B4%AD%E7%89%A9%E8%BD%A6.md#4101-购物车模型设计)\n        - [显示购物车商品](https://github.com/18820227745/shop-demo-node/blob/master/book/4.10%20%E8%B4%AD%E7%89%A9%E8%BD%A6.md#4102-显示购物车商品)\n        - [添加购物车商品](https://github.com/18820227745/shop-demo-node/blob/master/book/4.10%20%E8%B4%AD%E7%89%A9%E8%BD%A6.md#4103-添加购物车商品)\n        - [删除购物车商品](https://github.com/18820227745/shop-demo-node/blob/master/book/4.10%20%E8%B4%AD%E7%89%A9%E8%BD%A6.md#4104-删除购物车商品)\n        - [结算](https://github.com/18820227745/shop-demo-node/blob/master/book/4.10%20%E8%B4%AD%E7%89%A9%E8%BD%A6.md#4105-结算)\n    - [日志](https://github.com/18820227745/shop-demo-node/blob/master/book/4.11%20%E6%97%A5%E5%BF%97.md)\n        - [winston 和 express-winston](https://github.com/18820227745/shop-demo-node/blob/master/book/4.11%20%E6%97%A5%E5%BF%97.md#4111-winston-和-express-winston)\n        - [.gitignore](https://github.com/18820227745/shop-demo-node/blob/master/book/4.11%20%E6%97%A5%E5%BF%97.md#4112-gitignore)\n    - [测试](https://github.com/18820227745/shop-demo-node/blob/master/book/4.12%20%E6%B5%8B%E8%AF%95.md)\n        - [mocha 和 supertest](https://github.com/18820227745/shop-demo-node/blob/master/book/4.12%20%E6%B5%8B%E8%AF%95.md#4121-mocha-和-supertest)\n        - [测试覆盖率](https://github.com/18820227745/shop-demo-node/blob/master/book/4.12%20%E6%B5%8B%E8%AF%95.md#4122-测试覆盖率)\n    - [部署](https://github.com/18820227745/shop-demo-node/blob/master/book/4.13%20%E9%83%A8%E7%BD%B2.md)\n        - [申请 MLab](https://github.com/18820227745/shop-demo-node/blob/master/book/4.13%20%E9%83%A8%E7%BD%B2.md#4131-申请-mlab)\n        - [pm2](https://github.com/18820227745/shop-demo-node/blob/master/book/4.13%20%E9%83%A8%E7%BD%B2.md#4132-pm2)\n        - [部署到 Heroku](https://github.com/18820227745/shop-demo-node/blob/master/book/4.13%20%E9%83%A8%E7%BD%B2.md#4132-部署到-heroku)\n        - [部署到 UCloud](https://github.com/18820227745/shop-demo-node/blob/master/book/4.13%20%E9%83%A8%E7%BD%B2.md#4133-部署到-ucloud)\n\n\n文档格式，知识点参考：[N-blog](https://github.com/nswbmw/N-blog/tree/master/book)\n\n代码参考：[汇智网](http://www.hubwiz.com/course/?type=Node.js)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F18820227745%2Fshop-demo-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F18820227745%2Fshop-demo-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F18820227745%2Fshop-demo-node/lists"}