# nodejsDemo **Repository Path**: 312545773/nodejs-demo ## Basic Information - **Project Name**: nodejsDemo - **Description**: 第一个nodejs后台搭建 - **Primary Language**: JavaScript - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-12-07 - **Last Updated**: 2023-12-15 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## nodejs后台demo ### 初始化包管理配置文件: yarn init -y ### 安装espress yarn add express ### 安装cors yarn add cors ### 安装数据库 yarn add mysql ### 安装bcryptjs加密 yarn add bcryptjs ### 安装@hapi/joi包,为表单中携带的每个数据项,定义验证规则(加入未使用) yarn add @hapi/joi ### 安装@escook/express-joi中间件,来实现自动对表单数据进行验证的功能:(加入未使用) yarn add @escook/express-joi ### 安装jsonwebtoken生成 JWT 的 Token 字符串 yarn add jsonwebtoken ### 安装express-jwt配置解析 Token 的中间件 yarn add express-jwt