NodeJs:初学者实用指南 - 电子商务 Web API构建

什么是 Node.js?

Node.js 或 Node 是用于在浏览器之外执行 JavaScript 代码的运行时环境。它非常适合构建支持客户应用程序(Web 或移动应用程序)的高度可扩展、数据密集型后端服务 (API)。

为什么要学习Node?

Node 非常适合原型设计和敏捷开发以及构建超快速和高度可扩展的应用程序;Uber 和 PayPal 等公司在生产环境中使用 Node 来构建应用程序,因为它需要更少的人员和更少的代码。此外,Node 拥有最大的开源库生态系统,因此您不必从头开始构建所有内容。

你将学会:使用 Node.js、Express.js 和 MongoDB Atlas 自信地构建 RESTful 服务 (API),采用 Node.js 的最佳实践

  • 节点模块系统

  • 节点包管理器 (NPM)

  • 异步 JavaScript

  • 有用的 ES6+ 特性

  • 实施 CRUD 操作

  • 在 MongoDB 中存储复杂数据

  • 数据验证

  • 身份验证和授权

  • 用户角色

  • 以正确的方式处理和记录错误

  • 部署

    .
    ├── 1. Introduction
    │ ├── 1. Introduction (5).srt
    │ ├── 1. Introduction.mp4
    │ ├── 1. Introduction.srt
    │ ├── 2. Overview to our RESTful API.mp4
    │ ├── 2. Overview to our RESTful API.srt
    │ ├── 3. Pickup Your Task and We Review it - How this course is interactive.mp4
    │ ├── 3. Pickup Your Task and We Review it - How this course is interactive.srt
    │ ├── 4. Join Students Tasks Board - Invitation Link + Git Repo.html
    │ ├── 4.1 How to Create PR's in Github.html
    │ ├── 4.2 The Git Repository of the Course.html
    │ └── 4.3 Invitation to the Task Board.html
    ├── 2. Tools and Environment
    │ ├── 1. Installing NodeJs.mp4
    │ ├── 1. Installing NodeJs.srt
    │ ├── 2. Installing our Coding Editor (IDE) + Extensions.mp4
    │ ├── 2. Installing our Coding Editor (IDE) + Extensions.srt
    │ ├── 3. Installing PostMan to Test our API's.mp4
    │ ├── 3. Installing PostMan to Test our API's.srt
    │ ├── 4. Configure MongoDB Atlas.mp4
    │ └── 4. Configure MongoDB Atlas.srt
    ├── 25.txt
    ├── 3. Preparing the API Server
    │ ├── 1. Introduction (4).srt
    │ ├── 1. Introduction.mp4
    │ ├── 1. Introduction.srt
    │ ├── 10. Create Backend API Routes & Schemas.mp4
    │ ├── 10. Create Backend API Routes & Schemas.srt
    │ ├── 11. Enabling CORS & Why Do We Need It.mp4
    │ ├── 11. Enabling CORS & Why Do We Need It.srt
    │ ├── 12. Section Code.html
    │ ├── 12.1 initial-eshop-backend.zip
    │ ├── 2. File Structure.mp4
    │ ├── 2. File Structure.srt
    │ ├── 3. Creating the Backend Server with Express.mp4
    │ ├── 3. Creating the Backend Server with Express.srt
    │ ├── 4. Reading Environment Variables.mp4
    │ ├── 4. Reading Environment Variables.srt
    │ ├── 5. Create First API Call & Parsing Json Data.mp4
    │ ├── 5. Create First API Call & Parsing Json Data.srt
    │ ├── 6. Logging API Requests.mp4
    │ ├── 6. Logging API Requests.srt
    │ ├── 7. Installing Mongoose and Connect to MongoDB Database.mp4
    │ ├── 7. Installing Mongoose and Connect to MongoDB Database.srt
    │ ├── 8. ReadWrite Data to Database Using API.mp4
    │ ├── 8. ReadWrite Data to Database Using API.srt
    │ ├── 9. Analysing the E-Shop Database.mp4
    │ └── 9. Analysing the E-Shop Database.srt
    ├── 4. Products & Categories
    │ ├── 1. Introduction.mp4
    │ ├── 1. Introduction.srt
    │ ├── 10. Update a Product REST API.mp4
    │ ├── 10. Update a Product REST API.srt
    │ ├── 11. Delete a Product REST API and Validate Id.mp4
    │ ├── 11. Delete a Product REST API and Validate Id.srt
    │ ├── 12. Get Products Count for Statistics Purposes.mp4
    │ ├── 12. Get Products Count for Statistics Purposes.srt
    │ ├── 13. Get Featured Products REST API.mp4
    │ ├── 13. Get Featured Products REST API.srt
    │ ├── 14. Filtering and Getting Products by Category.mp4
    │ ├── 14. Filtering and Getting Products by Category.srt
    │ ├── 15. Changing _id key to id - more frontend friendly.mp4
    │ ├── 15. Changing _id key to id - more frontend friendly.srt
    │ ├── 16. Section Code.html
    │ ├── 16.1 backend-products.zip
    │ ├── 2. Products Model & Scheme.mp4
    │ ├── 2. Products Model & Scheme.srt
    │ ├── 3. Categories Model & Scheme.mp4
    │ ├── 3. Categories Model & Scheme.srt
    │ ├── 4. Add and Delete Categories.mp4
    │ ├── 4. Add and Delete Categories.srt
    │ ├── 5. Get Categories and Category Details.mp4
    │ ├── 5. Get Categories and Category Details.srt
    │ ├── 6. Update Category.mp4
    │ ├── 6. Update Category.srt
    │ ├── 7. Post a New Product REST API.mp4
    │ ├── 7. Post a New Product REST API.srt
    │ ├── 8. Get a Product & List of Products REST API.mp4
    │ ├── 8. Get a Product & List of Products REST API.srt
    │ ├── 9. Population of Category in Get a Product API.mp4
    │ └── 9. Population of Category in Get a Product API.srt
    ├── 5. Users & Authentication
    │ ├── 1. Introduction (3).srt
    │ ├── 1. Introduction.mp4
    │ ├── 1. Introduction.srt
    │ ├── 10. Add More Secret User Information to Token.mp4
    │ ├── 10. Add More Secret User Information to Token.srt
    │ ├── 11. Users & Admins - User Role.mp4
    │ ├── 11. Users & Admins - User Role.srt
    │ ├── 12. Get User Count REST API.mp4
    │ ├── 12. Get User Count REST API.srt
    │ ├── 13. Section Code.html
    │ ├── 13.1 backend-users.zip
    │ ├── 2. Users Model & Schema.mp4
    │ ├── 2. Users Model & Schema.srt
    │ ├── 3. PostRegister a New User REST API.mp4
    │ ├── 3. PostRegister a New User REST API.srt
    │ ├── 4. Hashing the User Password.mp4
    │ ├── 4. Hashing the User Password.srt
    │ ├── 5. Get User and List of Users Excluding Password.mp4
    │ ├── 5. Get User and List of Users Excluding Password.srt
    │ ├── 6. Login a User REST API & Creating a Token.mp4
    │ ├── 6. Login a User REST API & Creating a Token.srt
    │ ├── 7. Protecting the API and Authentication JWT Middleware.mp4
    │ ├── 7. Protecting the API and Authentication JWT Middleware.srt
    │ ├── 8. Authentication Error Handling.mp4
    │ ├── 8. Authentication Error Handling.srt
    │ ├── 9. Excluding REST API Routes From Authentication.mp4
    │ └── 9. Excluding REST API Routes From Authentication.srt
    ├── 6. Orders
    │ ├── 1. Introduction (1).srt
    │ ├── 1. Introduction.mp4
    │ ├── 1. Introduction.srt
    │ ├── 10. Get Total E-Shop Sales using sum.mp4 │ ├── 10. Get Total E-Shop Sales using sum.srt
    │ ├── 11. Get User Orders.mp4
    │ ├── 11. Get User Orders.srt
    │ ├── 12. Section Code.html
    │ ├── 12.1 backend-orders.zip
    │ ├── 2. Orders & Order-Items Model & Scheme.mp4
    │ ├── 2. Orders & Order-Items Model & Scheme.srt
    │ ├── 3. Array of Refs - Example of Link Order to Order Items to Products.mp4
    │ ├── 3. Array of Refs - Example of Link Order to Order Items to Products.srt
    │ ├── 4. New Order & Create Order Items on Posting New Order.mp4
    │ ├── 4. New Order & Create Order Items on Posting New Order.srt
    │ ├── 5. Get Order Detail and Populate Products in Order Items and User Data.mp4
    │ ├── 5. Get Order Detail and Populate Products in Order Items and User Data.srt
    │ ├── 6. Update Order Status & Delete Order.mp4
    │ ├── 6. Update Order Status & Delete Order.srt
    │ ├── 7. Delete Order Items after Deleting the Order.html
    │ ├── 8. Explaining the Solution.mp4
    │ ├── 8. Explaining the Solution.srt
    │ ├── 9. Calculating Total Price of one Order.mp4
    │ └── 9. Calculating Total Price of one Order.srt
    ├── 7. Product Image & Gallery Upload
    │ ├── 1. Introduction (2).srt
    │ ├── 1. Introduction.mp4
    │ ├── 1. Introduction.srt
    │ ├── 2. Configure Server Side Upload.mp4
    │ ├── 2. Configure Server Side Upload.srt
    │ ├── 3. Testing Image Upload with Postman.mp4
    │ ├── 3. Testing Image Upload with Postman.srt
    │ ├── 4. Validating Uploaded File Types.mp4
    │ ├── 4. Validating Uploaded File Types.srt
    │ ├── 5. Image Upload With Product Post Request.mp4
    │ ├── 5. Image Upload With Product Post Request.srt
    │ ├── 6. Product Gallery Multiple Images Upload.mp4
    │ ├── 6. Product Gallery Multiple Images Upload.srt
    │ ├── 7. Excluding Uploads Folder From Authentication.mp4
    │ ├── 7. Excluding Uploads Folder From Authentication.srt
    │ ├── 8. Section Code.html
    │ └── 8.1 full-backend.zip
    └── 8. What is Next
    └── 1. Next Steps.html

    8 directories, 146 files

相关推荐
南国韭菜4 分钟前
【无标题】
c++·qt
CodeStride6 分钟前
就像长跑配速一样,我是如何平衡代码性能与可读性的
java
弹简特18 分钟前
【Java项目-企悦抽】07-用户与认证模块-实现用户注册01
java·开发语言
L歪歪君19 分钟前
Apache Doris全链路性能优化实战指南:从架构设计到生产落地
java·开发语言·算法
Csvn19 分钟前
Python 开发技巧:标准库深度挖掘
后端·python
山东点狮信息科技有限公司35 分钟前
SpringBoot+VUE3,一套系统完成OA+HRM+CRM+MES+合同+项目管理 —— 深度解析点狮全业务管理平台
java·spring boot·后端
li星野36 分钟前
二分查找的三重变奏:有序区间、旋转最小值与平方根——从“猜数字”到“向量检索”的思维演化
python
没用的阿_吉1 小时前
vs2022offline 生成
c++
RSTJ_16251 小时前
PYTHON+AI LLM DAY ONE HUNDRED AND THREE
开发语言·人工智能·python
qq_416409131 小时前
专业的openclaw推荐
c++