├── .gitignore ├── .husky └── commit-msg ├── .vscode └── launch.json ├── 01_文件操作 ├── a.txt ├── file.js ├── read.js └── write.js ├── 02_mycli ├── bin │ └── cli.js ├── config.js ├── lib │ └── core │ │ ├── action.js │ │ ├── download.js │ │ ├── help.js │ │ └── mycommander.js ├── package-lock.json ├── package.json └── test │ ├── chalk.js │ ├── download.js │ ├── inquirer.js │ └── ora.js ├── 03_HttpServer ├── controller.js ├── index.html ├── router.js ├── server.js └── server_基础.js ├── 04_express ├── app.js ├── db.js ├── db.json ├── package-lock.json ├── package.json └── test.json ├── 05_express-template ├── app.js ├── bin │ └── www ├── package.json ├── public │ └── stylesheets │ │ └── style.css ├── routes │ ├── index.js │ └── users.js └── views │ ├── error.jade │ ├── index.jade │ └── layout.jade ├── 06_mongoDB ├── index.js ├── package-lock.json └── package.json ├── 07_express-study ├── app.js ├── bin │ └── www ├── package-lock.json ├── package.json ├── public │ ├── images │ │ └── 1.pdf │ └── stylesheets │ │ └── style.css ├── routes │ ├── index.js │ ├── login.js │ ├── users.js │ └── video.js └── views │ ├── error.jade │ ├── index.jade │ └── layout.jade ├── 08_express-base ├── app.js ├── bin │ └── www ├── config │ └── config.default.js ├── controller │ ├── index.js │ ├── userController.js │ ├── videoController.js │ └── vodController.js ├── middleware │ └── validator │ │ ├── errorBack.js │ │ ├── userValidator.js │ │ └── videoValidator.js ├── model │ ├── baseModel.js │ ├── collectModule.js │ ├── index.js │ ├── redis │ │ ├── index.js │ │ └── redishotsinc.js │ ├── subscribeModel.js │ ├── userModel.js │ ├── videoCommentModel.js │ ├── videoModel.js │ └── videolikeModel.js ├── package-lock.json ├── package.json ├── public │ ├── images │ │ ├── 1.pdf │ │ └── c558ab4c18149cfd8f0dd3e244117660.jpg │ └── stylesheets │ │ └── style.css ├── routes │ ├── index.js │ ├── login.js │ ├── users.js │ └── video.js ├── util │ ├── jwt.js │ └── md5.js └── views │ ├── error.jade │ ├── index.jade │ └── layout.jade ├── 09_redis ├── README.md ├── Redis_command.md ├── baseCommand.png ├── baseString.png ├── baseType.png ├── hots.js ├── index.js ├── package-lock.json └── package.json ├── 10_nginx ├── Config.md ├── README.md ├── SSL.md └── node-server.js ├── 11_npm └── README.md ├── 12_koa └── koa-test │ ├── app.js │ ├── onion.js │ ├── package-lock.json │ ├── package.json │ ├── rotuer │ └── index.js │ └── router.js ├── 13_koa-base ├── app.js ├── bin │ └── www ├── config │ └── config.default.js ├── controller │ ├── userController.js │ ├── videoController.js │ └── vodController.js ├── middleware │ ├── userValidate.js │ └── videoValidator.js ├── model │ ├── baseModel.js │ ├── collectModule.js │ ├── index.js │ ├── subscribeModel.js │ ├── userModel.js │ ├── videoCommentModel.js │ ├── videoModel.js │ └── videolikeModel.js ├── package-lock.json ├── package.json ├── public │ └── stylesheets │ │ └── style.css ├── routes │ ├── index.js │ └── users.js ├── util │ ├── jwt.js │ └── md5.js └── views │ ├── error.pug │ ├── index.pug │ └── layout.pug ├── 14_EventLoop ├── 01_JavaScript代码的执行流程.js ├── 02_JavaScript异步setTimeout.js ├── 03_宏任务和微任务面试题一.js ├── 04_宏任务和微任务面试题二.js ├── 05_Node队列任务面试题一.js └── 06_Node队列任务面试题二.js ├── 15_koaVSexpress ├── 01_express实现-同步数据.js ├── 02_express实现-异步数据.js ├── 03_koa实现-同步数据.js ├── 04_koa实现-异步数据.js ├── README.md ├── express_void.png ├── koa_promise.png ├── onion.png ├── package-lock.json └── package.json ├── 16_Egg ├── .eslintignore ├── .eslintrc ├── .github │ └── workflows │ │ └── nodejs.yml ├── .gitignore ├── README.md ├── app │ ├── controller │ │ └── home.js │ ├── router.js │ └── service │ │ └── user.js ├── config │ ├── config.default.js │ └── plugin.js ├── jsconfig.json ├── package.json └── test │ └── app │ └── controller │ └── home.test.js ├── 17_egg-base ├── .eslintignore ├── .eslintrc ├── .github │ └── workflows │ │ └── nodejs.yml ├── .gitignore ├── README.md ├── app │ ├── controller │ │ ├── home.js │ │ ├── user.js │ │ ├── video.js │ │ └── vod.js │ ├── extend │ │ └── helper.js │ ├── middleware │ │ ├── auth.js │ │ └── error_handler.js │ ├── model │ │ ├── baseModel.js │ │ ├── collectModule.js │ │ ├── subscribeModel.js │ │ ├── user.js │ │ ├── videoCommentModel.js │ │ ├── videoModel.js │ │ └── videolikeModel.js │ ├── router.js │ └── service │ │ ├── redis.js │ │ ├── redishot.js │ │ └── user.js ├── config │ ├── config.default.js │ └── plugin.js ├── jsconfig.json ├── package.json └── test │ └── app │ └── controller │ └── home.test.js ├── 18_Nest ├── README.md ├── nest-test │ ├── .eslintrc.js │ ├── .gitignore │ ├── .prettierrc │ ├── README.md │ ├── nest-cli.json │ ├── package-lock.json │ ├── package.json │ ├── src │ │ ├── app.controller.spec.ts │ │ ├── app.controller.ts │ │ ├── app.module.ts │ │ ├── app.service.ts │ │ ├── main.ts │ │ ├── user.controller.ts │ │ ├── users │ │ │ ├── dto │ │ │ │ ├── create-user.dto.ts │ │ │ │ └── update-user.dto.ts │ │ │ ├── entities │ │ │ │ └── user.entity.ts │ │ │ ├── schemas │ │ │ │ └── users.schema.ts │ │ │ ├── users.controller.spec.ts │ │ │ ├── users.controller.ts │ │ │ ├── users.module.ts │ │ │ ├── users.service.spec.ts │ │ │ └── users.service.ts │ │ └── video │ │ │ ├── video.controller.spec.ts │ │ │ ├── video.controller.ts │ │ │ ├── video.module.ts │ │ │ ├── video.service.spec.ts │ │ │ └── video.service.ts │ ├── test │ │ ├── app.e2e-spec.ts │ │ └── jest-e2e.json │ ├── tsconfig.build.json │ └── tsconfig.json ├── nest_study_xm │ ├── .eslintrc.js │ ├── .gitignore │ ├── .prettierrc │ ├── README.md │ ├── custom.ts │ ├── nest-cli.json │ ├── package.json │ ├── pnpm-lock.yaml │ ├── src │ │ ├── app.controller.spec.ts │ │ ├── app.controller.ts │ │ ├── app.module.ts │ │ ├── app.service.ts │ │ ├── common │ │ │ ├── filter.ts │ │ │ └── response.ts │ │ ├── demo │ │ │ ├── demo.controller.spec.ts │ │ │ ├── demo.controller.ts │ │ │ ├── demo.module.ts │ │ │ ├── demo.service.spec.ts │ │ │ └── demo.service.ts │ │ ├── guard │ │ │ ├── dto │ │ │ │ ├── create-guard.dto.ts │ │ │ │ └── update-guard.dto.ts │ │ │ ├── entities │ │ │ │ └── guard.entity.ts │ │ │ ├── guard.controller.spec.ts │ │ │ ├── guard.controller.ts │ │ │ ├── guard.module.ts │ │ │ ├── guard.service.spec.ts │ │ │ ├── guard.service.ts │ │ │ └── role │ │ │ │ ├── role.decorator.ts │ │ │ │ ├── role.guard.spec.ts │ │ │ │ └── role.guard.ts │ │ ├── list │ │ │ ├── dto │ │ │ │ ├── create-list.dto.ts │ │ │ │ └── update-list.dto.ts │ │ │ ├── entities │ │ │ │ └── list.entity.ts │ │ │ ├── list.controller.spec.ts │ │ │ ├── list.controller.ts │ │ │ ├── list.module.ts │ │ │ ├── list.service.spec.ts │ │ │ └── list.service.ts │ │ ├── logger │ │ │ ├── logger.middleware.spec.ts │ │ │ └── logger.middleware.ts │ │ ├── login │ │ │ ├── dto │ │ │ │ ├── create-login.dto.ts │ │ │ │ └── update-login.dto.ts │ │ │ ├── entities │ │ │ │ └── login.entity.ts │ │ │ ├── login.controller.spec.ts │ │ │ ├── login.controller.ts │ │ │ ├── login.module.ts │ │ │ ├── login.service.spec.ts │ │ │ ├── login.service.ts │ │ │ └── login │ │ │ │ ├── login.pipe.spec.ts │ │ │ │ └── login.pipe.ts │ │ ├── main.ts │ │ ├── mysql │ │ │ ├── dto │ │ │ │ ├── create-mysql.dto.ts │ │ │ │ └── update-mysql.dto.ts │ │ │ ├── entities │ │ │ │ └── mysql.entity.ts │ │ │ ├── mysql.controller.spec.ts │ │ │ ├── mysql.controller.ts │ │ │ ├── mysql.module.ts │ │ │ ├── mysql.service.spec.ts │ │ │ └── mysql.service.ts │ │ ├── p │ │ │ ├── dto │ │ │ │ ├── create-p.dto.ts │ │ │ │ └── update-p.dto.ts │ │ │ ├── entities │ │ │ │ └── p.entity.ts │ │ │ ├── p.controller.spec.ts │ │ │ ├── p.controller.ts │ │ │ ├── p.module.ts │ │ │ ├── p.service.spec.ts │ │ │ └── p.service.ts │ │ ├── spider │ │ │ ├── dto │ │ │ │ ├── create-spider.dto.ts │ │ │ │ └── update-spider.dto.ts │ │ │ ├── entities │ │ │ │ └── spider.entity.ts │ │ │ ├── spider.controller.spec.ts │ │ │ ├── spider.controller.ts │ │ │ ├── spider.module.ts │ │ │ ├── spider.service.spec.ts │ │ │ └── spider.service.ts │ │ ├── upload │ │ │ ├── dto │ │ │ │ ├── create-upload.dto.ts │ │ │ │ └── update-upload.dto.ts │ │ │ ├── entities │ │ │ │ └── upload.entity.ts │ │ │ ├── upload.controller.spec.ts │ │ │ ├── upload.controller.ts │ │ │ ├── upload.module.ts │ │ │ ├── upload.service.spec.ts │ │ │ └── upload.service.ts │ │ └── user │ │ │ ├── dto │ │ │ ├── create-user.dto.ts │ │ │ └── update-user.dto.ts │ │ │ ├── entities │ │ │ └── user.entity.ts │ │ │ ├── user.controller.spec.ts │ │ │ ├── user.controller.ts │ │ │ ├── user.module.ts │ │ │ ├── user.service.spec.ts │ │ │ └── user.service.ts │ ├── test │ │ ├── app.e2e-spec.ts │ │ └── jest-e2e.json │ ├── tsconfig.build.json │ └── tsconfig.json └── nest_xm_project │ ├── .eslintrc.js │ ├── .gitignore │ ├── .prettierrc │ ├── README.md │ ├── nest-cli.json │ ├── package.json │ ├── pnpm-lock.yaml │ ├── src │ ├── app.controller.spec.ts │ ├── app.controller.ts │ ├── app.module.ts │ ├── app.service.ts │ ├── main.ts │ ├── manger │ │ ├── dto │ │ │ ├── create-manger.dto.ts │ │ │ └── update-manger.dto.ts │ │ ├── entities │ │ │ └── manger.entity.ts │ │ ├── manger.controller.spec.ts │ │ ├── manger.controller.ts │ │ ├── manger.module.ts │ │ ├── manger.service.spec.ts │ │ └── manger.service.ts │ └── user │ │ ├── dto │ │ ├── create-user.dto.ts │ │ └── update-user.dto.ts │ │ ├── entities │ │ └── user.entity.ts │ │ ├── user.controller.spec.ts │ │ ├── user.controller.ts │ │ ├── user.module.ts │ │ ├── user.service.spec.ts │ │ └── user.service.ts │ ├── test │ ├── app.e2e-spec.ts │ └── jest-e2e.json │ ├── tsconfig.build.json │ └── tsconfig.json ├── 19_NodeApi ├── 01_fs │ ├── 01_fs读取操作.js │ ├── 02_文件描述符.js │ ├── 03_文件的读写.js │ ├── 04_文件夹创建-读取.js │ ├── 05_文件夹重命名.js │ ├── README.MD │ ├── abc.txt │ ├── ddd.txt │ ├── flag.jpg │ ├── qwe.txt │ └── thunder │ │ ├── chen.txt │ │ └── clear │ │ ├── love.js │ │ └── love.txt ├── 02_events │ ├── 01_events模块基本使用.js │ ├── 02_events模块取消事件监听.js │ ├── 03_events模块传递参数.js │ ├── 04_events模块常见的方法.js │ └── README.MD ├── 03_buffer │ ├── 01_buffer和字符串的转换.js │ ├── 02_buffer其他创建方式.js │ ├── 03_文件中读取buffer.js │ ├── README.MD │ ├── buffer.jpg │ ├── bufferfrom.jpg │ ├── fromStringFast.jpg │ ├── fromstring.jpg │ ├── fsf02.jpg │ └── test.txt └── 04_stream │ ├── 01_可读流的基本使用.js │ ├── 02_可读流的其他事件.js │ ├── 03_可写流的基本使用.js │ ├── 04_文件的拷贝流的操作.js │ ├── README.MD │ ├── foo.txt │ ├── foo_copy.txt │ ├── foo_copy02.txt │ ├── foo_copy03.txt │ └── test.txt ├── 20_Nest_v2 ├── gateway │ ├── fast-gateway-feat-core │ │ ├── .eslintrc.js │ │ ├── .gitignore │ │ ├── .prettierrc │ │ ├── Dockerfile │ │ ├── README.md │ │ ├── docker-compose.gateway-service-dev.yml │ │ ├── ecosystem.config.js │ │ ├── nest-cli.json │ │ ├── package-lock.json │ │ ├── package.json │ │ ├── src │ │ │ ├── app.module.ts │ │ │ ├── auth │ │ │ │ ├── auth.controller.ts │ │ │ │ ├── auth.dto.ts │ │ │ │ ├── auth.module.ts │ │ │ │ ├── auth.service.ts │ │ │ │ ├── constants.ts │ │ │ │ ├── guards │ │ │ │ │ ├── feishu-auth.guard.ts │ │ │ │ │ └── jwt-auth.guard.ts │ │ │ │ └── strategies │ │ │ │ │ ├── feishu.strategy.ts │ │ │ │ │ └── jwt.strategy.ts │ │ │ ├── common │ │ │ │ ├── constants.ts │ │ │ │ ├── database │ │ │ │ │ ├── database.module.ts │ │ │ │ │ ├── database.providers.ts │ │ │ │ │ └── naming.strategies.ts │ │ │ │ ├── exceptions │ │ │ │ │ ├── base.exception.filter.ts │ │ │ │ │ ├── business.error.codes.ts │ │ │ │ │ ├── business.exception.ts │ │ │ │ │ ├── feishu.exception.ts │ │ │ │ │ └── http.exception.filter.ts │ │ │ │ ├── fastHook │ │ │ │ │ └── index.ts │ │ │ │ ├── interceptors │ │ │ │ │ └── transform.interceptor.ts │ │ │ │ └── logger │ │ │ │ │ ├── catchError.ts │ │ │ │ │ ├── fileStream.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── logStream.ts │ │ │ │ │ └── logger.ts │ │ │ ├── core │ │ │ │ ├── fileSysCache.ts │ │ │ │ ├── files_mock.json │ │ │ │ ├── intercepter.controller.ts │ │ │ │ ├── intercepter.middleware.ts │ │ │ │ ├── intercepter.module.ts │ │ │ │ ├── intercepter.service.ts │ │ │ │ ├── intercepter.ts │ │ │ │ ├── types.ts │ │ │ │ └── websites_mock.json │ │ │ ├── doc.ts │ │ │ ├── helper │ │ │ │ ├── constants.ts │ │ │ │ ├── feishu │ │ │ │ │ ├── auth.ts │ │ │ │ │ ├── const.ts │ │ │ │ │ ├── message.ts │ │ │ │ │ ├── type.ts │ │ │ │ │ └── user.ts │ │ │ │ └── index.ts │ │ │ ├── main.ts │ │ │ ├── materials │ │ │ │ ├── group │ │ │ │ │ ├── code │ │ │ │ │ │ ├── code.dto.ts │ │ │ │ │ │ ├── code.mongo.entity.ts │ │ │ │ │ │ └── code.service.ts │ │ │ │ │ ├── group.controller.ts │ │ │ │ │ ├── group.module.ts │ │ │ │ │ ├── group.providers.ts │ │ │ │ │ ├── monorepo │ │ │ │ │ │ ├── monorepoGroup.dto.ts │ │ │ │ │ │ ├── monorepoGroup.mongo.entity.ts │ │ │ │ │ │ └── monorepoGroup.service.ts │ │ │ │ │ └── multrepo │ │ │ │ │ │ ├── multrepoGroup.dto.ts │ │ │ │ │ │ ├── multrepoGroup.mongo.entity.ts │ │ │ │ │ │ └── multrepoGroup.service.ts │ │ │ │ ├── material │ │ │ │ │ ├── config │ │ │ │ │ │ ├── materialConfig.dto.ts │ │ │ │ │ │ ├── materialConfig.mongo.entity.ts │ │ │ │ │ │ └── materialConfig.service.ts │ │ │ │ │ ├── material.controller.ts │ │ │ │ │ ├── material.module.ts │ │ │ │ │ ├── material.providers.ts │ │ │ │ │ ├── physical │ │ │ │ │ │ ├── physical.dto.ts │ │ │ │ │ │ ├── physical.mongo.entity.ts │ │ │ │ │ │ └── physical.service.ts │ │ │ │ │ └── virtual │ │ │ │ │ │ ├── virtual.mongo.entity.ts │ │ │ │ │ │ └── virtual.service.ts │ │ │ │ ├── materials.module.ts │ │ │ │ ├── page │ │ │ │ │ ├── deployConfig │ │ │ │ │ │ ├── deployConfig.mongo.entity.ts │ │ │ │ │ │ └── deployConfig.service.ts │ │ │ │ │ ├── page.controller.ts │ │ │ │ │ ├── page.dto.ts │ │ │ │ │ ├── page.module.ts │ │ │ │ │ ├── page.mongo.entity.ts │ │ │ │ │ ├── page.providers.ts │ │ │ │ │ ├── page.service.ts │ │ │ │ │ └── pageConfig │ │ │ │ │ │ ├── pageConfig.controller.ts │ │ │ │ │ │ ├── pageConfig.dto.ts │ │ │ │ │ │ ├── pageConfig.mongo.entity.ts │ │ │ │ │ │ └── pageConfig.service.ts │ │ │ │ ├── project │ │ │ │ │ ├── project.controller.ts │ │ │ │ │ ├── project.dto.ts │ │ │ │ │ ├── project.module.ts │ │ │ │ │ ├── project.mongo.entity.ts │ │ │ │ │ ├── project.providers.ts │ │ │ │ │ └── project.service.ts │ │ │ │ └── task │ │ │ │ │ ├── task.controller.ts │ │ │ │ │ ├── task.dto.ts │ │ │ │ │ ├── task.module.ts │ │ │ │ │ ├── task.mongo.entity.ts │ │ │ │ │ ├── task.providers.ts │ │ │ │ │ └── task.service.ts │ │ │ ├── userCenter │ │ │ │ ├── privilege │ │ │ │ │ ├── privilege.controller.ts │ │ │ │ │ ├── privilege.dto.ts │ │ │ │ │ ├── privilege.module.ts │ │ │ │ │ ├── privilege.mysql.entity.ts │ │ │ │ │ ├── privilege.providers.ts │ │ │ │ │ └── privilege.service.ts │ │ │ │ ├── resource │ │ │ │ │ ├── resource.controller.ts │ │ │ │ │ ├── resource.dto.ts │ │ │ │ │ ├── resource.module.ts │ │ │ │ │ ├── resource.mysql.entity.ts │ │ │ │ │ ├── resource.providers.ts │ │ │ │ │ └── resource.service.ts │ │ │ │ ├── role-privilege │ │ │ │ │ ├── role-privilege.module.ts │ │ │ │ │ ├── role-privilege.mysql.entity.ts │ │ │ │ │ ├── role-privilege.service.ts │ │ │ │ │ └── user-privilege.providers.ts │ │ │ │ ├── role │ │ │ │ │ ├── role.controller.ts │ │ │ │ │ ├── role.dto.ts │ │ │ │ │ ├── role.module.ts │ │ │ │ │ ├── role.mysql.entity.ts │ │ │ │ │ ├── role.providers.ts │ │ │ │ │ └── role.service.ts │ │ │ │ ├── system │ │ │ │ │ ├── system.controller.ts │ │ │ │ │ ├── system.dto.ts │ │ │ │ │ ├── system.module.ts │ │ │ │ │ ├── system.mysql.entity.ts │ │ │ │ │ ├── system.providers.ts │ │ │ │ │ └── system.service.ts │ │ │ │ ├── user-role │ │ │ │ │ ├── user-role.module.ts │ │ │ │ │ ├── user-role.mysql.entity.ts │ │ │ │ │ ├── user-role.providers.ts │ │ │ │ │ └── user-role.service.ts │ │ │ │ └── user │ │ │ │ │ ├── feishu │ │ │ │ │ ├── feishu.dto.ts │ │ │ │ │ └── feishu.service.ts │ │ │ │ │ ├── user.controller.ts │ │ │ │ │ ├── user.dto.ts │ │ │ │ │ ├── user.module.ts │ │ │ │ │ ├── user.mysql.entity.ts │ │ │ │ │ ├── user.providers.ts │ │ │ │ │ └── user.service.ts │ │ │ └── utils │ │ │ │ ├── index.ts │ │ │ │ └── request.ts │ │ ├── start_dev_service.sh │ │ ├── test │ │ │ ├── app.e2e-spec.ts │ │ │ └── jest-e2e.json │ │ ├── tsconfig.build.json │ │ ├── tsconfig.json │ │ ├── types │ │ │ ├── globle.d.ts │ │ │ └── type.ts │ │ └── webpack-hmr.config.js │ ├── fast-gateway-feat-material │ │ ├── .eslintrc.js │ │ ├── .gitignore │ │ ├── .prettierrc │ │ ├── Dockerfile │ │ ├── README.md │ │ ├── docker-compose.gateway-service-dev.yml │ │ ├── ecosystem.config.js │ │ ├── nest-cli.json │ │ ├── package-lock.json │ │ ├── package.json │ │ ├── src │ │ │ ├── app.module.ts │ │ │ ├── auth │ │ │ │ ├── auth.controller.ts │ │ │ │ ├── auth.dto.ts │ │ │ │ ├── auth.module.ts │ │ │ │ ├── auth.service.ts │ │ │ │ ├── constants.ts │ │ │ │ ├── guards │ │ │ │ │ ├── feishu-auth.guard.ts │ │ │ │ │ └── jwt-auth.guard.ts │ │ │ │ └── strategies │ │ │ │ │ ├── feishu.strategy.ts │ │ │ │ │ └── jwt.strategy.ts │ │ │ ├── common │ │ │ │ ├── constants.ts │ │ │ │ ├── database │ │ │ │ │ ├── database.module.ts │ │ │ │ │ ├── database.providers.ts │ │ │ │ │ └── naming.strategies.ts │ │ │ │ ├── exceptions │ │ │ │ │ ├── base.exception.filter.ts │ │ │ │ │ ├── business.error.codes.ts │ │ │ │ │ ├── business.exception.ts │ │ │ │ │ ├── feishu.exception.ts │ │ │ │ │ └── http.exception.filter.ts │ │ │ │ ├── fastHook │ │ │ │ │ └── index.ts │ │ │ │ ├── interceptors │ │ │ │ │ └── transform.interceptor.ts │ │ │ │ └── logger │ │ │ │ │ ├── catchError.ts │ │ │ │ │ ├── fileStream.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── logStream.ts │ │ │ │ │ └── logger.ts │ │ │ ├── doc.ts │ │ │ ├── helper │ │ │ │ ├── constants.ts │ │ │ │ ├── feishu │ │ │ │ │ ├── auth.ts │ │ │ │ │ ├── const.ts │ │ │ │ │ ├── message.ts │ │ │ │ │ ├── type.ts │ │ │ │ │ └── user.ts │ │ │ │ └── index.ts │ │ │ ├── main.ts │ │ │ ├── materials │ │ │ │ ├── group │ │ │ │ │ ├── code │ │ │ │ │ │ ├── code.dto.ts │ │ │ │ │ │ ├── code.mongo.entity.ts │ │ │ │ │ │ └── code.service.ts │ │ │ │ │ ├── group.controller.ts │ │ │ │ │ ├── group.module.ts │ │ │ │ │ ├── group.providers.ts │ │ │ │ │ ├── monorepo │ │ │ │ │ │ ├── monorepoGroup.dto.ts │ │ │ │ │ │ ├── monorepoGroup.mongo.entity.ts │ │ │ │ │ │ └── monorepoGroup.service.ts │ │ │ │ │ └── multrepo │ │ │ │ │ │ ├── multrepoGroup.dto.ts │ │ │ │ │ │ ├── multrepoGroup.mongo.entity.ts │ │ │ │ │ │ └── multrepoGroup.service.ts │ │ │ │ ├── material │ │ │ │ │ ├── config │ │ │ │ │ │ ├── materialConfig.dto.ts │ │ │ │ │ │ ├── materialConfig.mongo.entity.ts │ │ │ │ │ │ └── materialConfig.service.ts │ │ │ │ │ ├── material.controller.ts │ │ │ │ │ ├── material.module.ts │ │ │ │ │ ├── material.providers.ts │ │ │ │ │ ├── physical │ │ │ │ │ │ ├── physical.dto.ts │ │ │ │ │ │ ├── physical.mongo.entity.ts │ │ │ │ │ │ └── physical.service.ts │ │ │ │ │ └── virtual │ │ │ │ │ │ ├── virtual.mongo.entity.ts │ │ │ │ │ │ └── virtual.service.ts │ │ │ │ ├── materials.module.ts │ │ │ │ ├── page │ │ │ │ │ ├── deployConfig │ │ │ │ │ │ ├── deployConfig.mongo.entity.ts │ │ │ │ │ │ └── deployConfig.service.ts │ │ │ │ │ ├── page.controller.ts │ │ │ │ │ ├── page.dto.ts │ │ │ │ │ ├── page.module.ts │ │ │ │ │ ├── page.mongo.entity.ts │ │ │ │ │ ├── page.providers.ts │ │ │ │ │ ├── page.service.ts │ │ │ │ │ └── pageConfig │ │ │ │ │ │ ├── pageConfig.controller.ts │ │ │ │ │ │ ├── pageConfig.dto.ts │ │ │ │ │ │ ├── pageConfig.mongo.entity.ts │ │ │ │ │ │ └── pageConfig.service.ts │ │ │ │ ├── project │ │ │ │ │ ├── project.controller.ts │ │ │ │ │ ├── project.dto.ts │ │ │ │ │ ├── project.module.ts │ │ │ │ │ ├── project.mongo.entity.ts │ │ │ │ │ ├── project.providers.ts │ │ │ │ │ └── project.service.ts │ │ │ │ └── task │ │ │ │ │ ├── task.controller.ts │ │ │ │ │ ├── task.dto.ts │ │ │ │ │ ├── task.module.ts │ │ │ │ │ ├── task.mongo.entity.ts │ │ │ │ │ ├── task.providers.ts │ │ │ │ │ └── task.service.ts │ │ │ ├── userCenter │ │ │ │ ├── privilege │ │ │ │ │ ├── privilege.controller.ts │ │ │ │ │ ├── privilege.dto.ts │ │ │ │ │ ├── privilege.module.ts │ │ │ │ │ ├── privilege.mysql.entity.ts │ │ │ │ │ ├── privilege.providers.ts │ │ │ │ │ └── privilege.service.ts │ │ │ │ ├── resource │ │ │ │ │ ├── resource.controller.ts │ │ │ │ │ ├── resource.dto.ts │ │ │ │ │ ├── resource.module.ts │ │ │ │ │ ├── resource.mysql.entity.ts │ │ │ │ │ ├── resource.providers.ts │ │ │ │ │ └── resource.service.ts │ │ │ │ ├── role-privilege │ │ │ │ │ ├── role-privilege.module.ts │ │ │ │ │ ├── role-privilege.mysql.entity.ts │ │ │ │ │ ├── role-privilege.service.ts │ │ │ │ │ └── user-privilege.providers.ts │ │ │ │ ├── role │ │ │ │ │ ├── role.controller.ts │ │ │ │ │ ├── role.dto.ts │ │ │ │ │ ├── role.module.ts │ │ │ │ │ ├── role.mysql.entity.ts │ │ │ │ │ ├── role.providers.ts │ │ │ │ │ └── role.service.ts │ │ │ │ ├── system │ │ │ │ │ ├── system.controller.ts │ │ │ │ │ ├── system.dto.ts │ │ │ │ │ ├── system.module.ts │ │ │ │ │ ├── system.mysql.entity.ts │ │ │ │ │ ├── system.providers.ts │ │ │ │ │ └── system.service.ts │ │ │ │ ├── user-role │ │ │ │ │ ├── user-role.module.ts │ │ │ │ │ ├── user-role.mysql.entity.ts │ │ │ │ │ ├── user-role.providers.ts │ │ │ │ │ └── user-role.service.ts │ │ │ │ └── user │ │ │ │ │ ├── feishu │ │ │ │ │ ├── feishu.dto.ts │ │ │ │ │ └── feishu.service.ts │ │ │ │ │ ├── user.controller.ts │ │ │ │ │ ├── user.dto.ts │ │ │ │ │ ├── user.module.ts │ │ │ │ │ ├── user.mysql.entity.ts │ │ │ │ │ ├── user.providers.ts │ │ │ │ │ └── user.service.ts │ │ │ └── utils │ │ │ │ ├── index.ts │ │ │ │ └── request.ts │ │ ├── start_dev_service.sh │ │ ├── test │ │ │ ├── app.e2e-spec.ts │ │ │ └── jest-e2e.json │ │ ├── tsconfig.build.json │ │ ├── tsconfig.json │ │ ├── types │ │ │ ├── globle.d.ts │ │ │ └── type.ts │ │ └── webpack-hmr.config.js │ ├── fast-gateway-feat-user │ │ ├── .eslintrc.js │ │ ├── .gitignore │ │ ├── .prettierrc │ │ ├── Dockerfile │ │ ├── README.md │ │ ├── docker-compose.gateway-service-dev.yml │ │ ├── ecosystem.config.js │ │ ├── nest-cli.json │ │ ├── package-lock.json │ │ ├── package.json │ │ ├── src │ │ │ ├── app.module.ts │ │ │ ├── auth │ │ │ │ ├── auth.controller.ts │ │ │ │ ├── auth.dto.ts │ │ │ │ ├── auth.module.ts │ │ │ │ ├── auth.service.ts │ │ │ │ ├── constants.ts │ │ │ │ ├── guards │ │ │ │ │ ├── feishu-auth.guard.ts │ │ │ │ │ └── jwt-auth.guard.ts │ │ │ │ └── strategies │ │ │ │ │ ├── feishu.strategy.ts │ │ │ │ │ └── jwt.strategy.ts │ │ │ ├── common │ │ │ │ ├── constants.ts │ │ │ │ ├── database │ │ │ │ │ ├── database.module.ts │ │ │ │ │ ├── database.providers.ts │ │ │ │ │ └── naming.strategies.ts │ │ │ │ ├── exceptions │ │ │ │ │ ├── base.exception.filter.ts │ │ │ │ │ ├── business.error.codes.ts │ │ │ │ │ ├── business.exception.ts │ │ │ │ │ ├── feishu.exception.ts │ │ │ │ │ └── http.exception.filter.ts │ │ │ │ ├── fastHook │ │ │ │ │ └── index.ts │ │ │ │ ├── interceptors │ │ │ │ │ └── transform.interceptor.ts │ │ │ │ └── logger │ │ │ │ │ ├── catchError.ts │ │ │ │ │ ├── fileStream.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── logStream.ts │ │ │ │ │ └── logger.ts │ │ │ ├── doc.ts │ │ │ ├── helper │ │ │ │ ├── constants.ts │ │ │ │ ├── feishu │ │ │ │ │ ├── auth.ts │ │ │ │ │ ├── const.ts │ │ │ │ │ ├── message.ts │ │ │ │ │ ├── type.ts │ │ │ │ │ └── user.ts │ │ │ │ └── index.ts │ │ │ ├── main.ts │ │ │ ├── materials │ │ │ │ └── page │ │ │ │ │ ├── deploy-config │ │ │ │ │ ├── deploy-config.mongo.entity.ts │ │ │ │ │ └── deploy-config.service.ts │ │ │ │ │ ├── page-config │ │ │ │ │ ├── dto │ │ │ │ │ │ ├── create-page-config.dto.ts │ │ │ │ │ │ └── update-page-config.dto.ts │ │ │ │ │ ├── page-config.controller.ts │ │ │ │ │ ├── page-config.mongo.entity.ts │ │ │ │ │ └── page-config.service.ts │ │ │ │ │ ├── page.controller.ts │ │ │ │ │ ├── page.dto.ts │ │ │ │ │ ├── page.module.ts │ │ │ │ │ ├── page.mongo.entity.ts │ │ │ │ │ ├── page.providers.ts │ │ │ │ │ └── page.service.ts │ │ │ ├── userCenter │ │ │ │ ├── privilege │ │ │ │ │ ├── privilege.controller.ts │ │ │ │ │ ├── privilege.dto.ts │ │ │ │ │ ├── privilege.module.ts │ │ │ │ │ ├── privilege.mysql.entity.ts │ │ │ │ │ ├── privilege.providers.ts │ │ │ │ │ └── privilege.service.ts │ │ │ │ ├── resource │ │ │ │ │ ├── resource.controller.ts │ │ │ │ │ ├── resource.dto.ts │ │ │ │ │ ├── resource.module.ts │ │ │ │ │ ├── resource.mysql.entity.ts │ │ │ │ │ ├── resource.providers.ts │ │ │ │ │ └── resource.service.ts │ │ │ │ ├── role-privilege │ │ │ │ │ ├── role-privilege.module.ts │ │ │ │ │ ├── role-privilege.mysql.entity.ts │ │ │ │ │ ├── role-privilege.service.ts │ │ │ │ │ └── user-privilege.providers.ts │ │ │ │ ├── role │ │ │ │ │ ├── role.controller.ts │ │ │ │ │ ├── role.dto.ts │ │ │ │ │ ├── role.module.ts │ │ │ │ │ ├── role.mysql.entity.ts │ │ │ │ │ ├── role.providers.ts │ │ │ │ │ └── role.service.ts │ │ │ │ ├── system │ │ │ │ │ ├── system.controller.ts │ │ │ │ │ ├── system.dto.ts │ │ │ │ │ ├── system.module.ts │ │ │ │ │ ├── system.mysql.entity.ts │ │ │ │ │ ├── system.providers.ts │ │ │ │ │ └── system.service.ts │ │ │ │ ├── user-role │ │ │ │ │ ├── user-role.module.ts │ │ │ │ │ ├── user-role.mysql.entity.ts │ │ │ │ │ ├── user-role.providers.ts │ │ │ │ │ └── user-role.service.ts │ │ │ │ └── user │ │ │ │ │ ├── feishu │ │ │ │ │ ├── feishu.dto.ts │ │ │ │ │ └── feishu.service.ts │ │ │ │ │ ├── user.controller.ts │ │ │ │ │ ├── user.dto.ts │ │ │ │ │ ├── user.module.ts │ │ │ │ │ ├── user.mysql.entity.ts │ │ │ │ │ ├── user.providers.ts │ │ │ │ │ └── user.service.ts │ │ │ └── utils │ │ │ │ ├── index.ts │ │ │ │ └── request.ts │ │ ├── start_dev_service.sh │ │ ├── test │ │ │ ├── app.e2e-spec.ts │ │ │ └── jest-e2e.json │ │ ├── tsconfig.build.json │ │ ├── tsconfig.json │ │ ├── types │ │ │ ├── globle.d.ts │ │ │ └── type.ts │ │ └── webpack-hmr.config.js │ └── fast-gateway-main │ │ ├── .eslintrc.js │ │ ├── .gitignore │ │ ├── .npmrc │ │ ├── .prettierrc │ │ ├── README.md │ │ ├── apps │ │ ├── fast-gateway │ │ │ ├── package.json │ │ │ ├── src │ │ │ │ ├── app.module.ts │ │ │ │ ├── core │ │ │ │ │ ├── fileSysCache.ts │ │ │ │ │ ├── files_mock.json │ │ │ │ │ ├── intercepter.controller.spec.ts │ │ │ │ │ ├── intercepter.controller.ts │ │ │ │ │ ├── intercepter.middleware.ts │ │ │ │ │ ├── intercepter.module.ts │ │ │ │ │ ├── intercepter.service.ts │ │ │ │ │ ├── intercepter.ts │ │ │ │ │ ├── types.ts │ │ │ │ │ └── websites_mock.json │ │ │ │ ├── doc.ts │ │ │ │ └── main.ts │ │ │ ├── test │ │ │ │ ├── intercepter.e2e-spec.ts │ │ │ │ └── jest-e2e.json │ │ │ └── tsconfig.app.json │ │ ├── materials │ │ │ ├── package.json │ │ │ ├── src │ │ │ │ ├── auth │ │ │ │ │ ├── auth.module.ts │ │ │ │ │ ├── constants.ts │ │ │ │ │ ├── guards │ │ │ │ │ │ ├── jwt-auth.guard.ts │ │ │ │ │ │ └── permission.guard.ts │ │ │ │ │ └── strategies │ │ │ │ │ │ └── jwt.strategy.ts │ │ │ │ ├── doc.ts │ │ │ │ ├── main.ts │ │ │ │ ├── materials.module.ts │ │ │ │ ├── materials │ │ │ │ │ ├── group │ │ │ │ │ │ ├── code │ │ │ │ │ │ │ ├── code.dto.ts │ │ │ │ │ │ │ ├── code.mongo.entity.ts │ │ │ │ │ │ │ └── code.service.ts │ │ │ │ │ │ ├── group.controller.ts │ │ │ │ │ │ ├── group.module.ts │ │ │ │ │ │ ├── group.providers.ts │ │ │ │ │ │ ├── monorepo │ │ │ │ │ │ │ ├── monorepoGroup.dto.ts │ │ │ │ │ │ │ ├── monorepoGroup.mongo.entity.ts │ │ │ │ │ │ │ └── monorepoGroup.service.ts │ │ │ │ │ │ └── multrepo │ │ │ │ │ │ │ ├── multrepoGroup.dto.ts │ │ │ │ │ │ │ ├── multrepoGroup.mongo.entity.ts │ │ │ │ │ │ │ └── multrepoGroup.service.ts │ │ │ │ │ ├── material │ │ │ │ │ │ ├── config │ │ │ │ │ │ │ ├── materialConfig.dto.ts │ │ │ │ │ │ │ ├── materialConfig.mongo.entity.ts │ │ │ │ │ │ │ └── materialConfig.service.ts │ │ │ │ │ │ ├── material.controller.ts │ │ │ │ │ │ ├── material.module.ts │ │ │ │ │ │ ├── material.providers.ts │ │ │ │ │ │ ├── physical │ │ │ │ │ │ │ ├── physical.dto.ts │ │ │ │ │ │ │ ├── physical.mongo.entity.ts │ │ │ │ │ │ │ └── physical.service.ts │ │ │ │ │ │ └── virtual │ │ │ │ │ │ │ ├── virtual.mongo.entity.ts │ │ │ │ │ │ │ └── virtual.service.ts │ │ │ │ │ ├── page │ │ │ │ │ │ ├── deployConfig │ │ │ │ │ │ │ ├── deployConfig.mongo.entity.ts │ │ │ │ │ │ │ └── deployConfig.service.ts │ │ │ │ │ │ ├── page.controller.ts │ │ │ │ │ │ ├── page.dto.ts │ │ │ │ │ │ ├── page.module.ts │ │ │ │ │ │ ├── page.mongo.entity.ts │ │ │ │ │ │ ├── page.providers.ts │ │ │ │ │ │ ├── page.service.ts │ │ │ │ │ │ └── pageConfig │ │ │ │ │ │ │ ├── pageConfig.controller.ts │ │ │ │ │ │ │ ├── pageConfig.dto.ts │ │ │ │ │ │ │ ├── pageConfig.mongo.entity.ts │ │ │ │ │ │ │ └── pageConfig.service.ts │ │ │ │ │ ├── project │ │ │ │ │ │ ├── project.controller.ts │ │ │ │ │ │ ├── project.dto.ts │ │ │ │ │ │ ├── project.module.ts │ │ │ │ │ │ ├── project.mongo.entity.ts │ │ │ │ │ │ ├── project.providers.ts │ │ │ │ │ │ └── project.service.ts │ │ │ │ │ └── task │ │ │ │ │ │ ├── task.controller.ts │ │ │ │ │ │ ├── task.dto.ts │ │ │ │ │ │ ├── task.module.ts │ │ │ │ │ │ ├── task.mongo.entity.ts │ │ │ │ │ │ ├── task.providers.ts │ │ │ │ │ │ └── task.service.ts │ │ │ │ └── microservices │ │ │ │ │ ├── microservices.module.ts │ │ │ │ │ └── user.service.ts │ │ │ ├── test │ │ │ │ ├── app.e2e-spec.ts │ │ │ │ └── jest-e2e.json │ │ │ └── tsconfig.app.json │ │ └── user-center │ │ │ ├── package.json │ │ │ ├── src │ │ │ ├── auth │ │ │ │ ├── auth.controller.ts │ │ │ │ ├── auth.dto.ts │ │ │ │ ├── auth.module.ts │ │ │ │ ├── auth.service.ts │ │ │ │ ├── constants.ts │ │ │ │ ├── guards │ │ │ │ │ ├── feishu-auth.guard.ts │ │ │ │ │ └── jwt-auth.guard.ts │ │ │ │ └── strategies │ │ │ │ │ ├── feishu.strategy.ts │ │ │ │ │ └── jwt.strategy.ts │ │ │ ├── doc.ts │ │ │ ├── main.ts │ │ │ ├── user-center.module.ts │ │ │ └── userCenter │ │ │ │ ├── privilege │ │ │ │ ├── privilege.controller.ts │ │ │ │ ├── privilege.dto.ts │ │ │ │ ├── privilege.module.ts │ │ │ │ ├── privilege.mysql.entity.ts │ │ │ │ ├── privilege.providers.ts │ │ │ │ └── privilege.service.ts │ │ │ │ ├── resource │ │ │ │ ├── resource.controller.ts │ │ │ │ ├── resource.dto.ts │ │ │ │ ├── resource.module.ts │ │ │ │ ├── resource.mysql.entity.ts │ │ │ │ ├── resource.providers.ts │ │ │ │ └── resource.service.ts │ │ │ │ ├── role-privilege │ │ │ │ ├── role-privilege.module.ts │ │ │ │ ├── role-privilege.mysql.entity.ts │ │ │ │ ├── role-privilege.service.ts │ │ │ │ └── user-privilege.providers.ts │ │ │ │ ├── role │ │ │ │ ├── role.controller.ts │ │ │ │ ├── role.dto.ts │ │ │ │ ├── role.module.ts │ │ │ │ ├── role.mysql.entity.ts │ │ │ │ ├── role.providers.ts │ │ │ │ └── role.service.ts │ │ │ │ ├── system │ │ │ │ ├── system.controller.ts │ │ │ │ ├── system.dto.ts │ │ │ │ ├── system.module.ts │ │ │ │ ├── system.mysql.entity.ts │ │ │ │ ├── system.providers.ts │ │ │ │ └── system.service.ts │ │ │ │ ├── user-role │ │ │ │ ├── user-role.module.ts │ │ │ │ ├── user-role.mysql.entity.ts │ │ │ │ ├── user-role.providers.ts │ │ │ │ └── user-role.service.ts │ │ │ │ └── user │ │ │ │ ├── feishu │ │ │ │ ├── feishu.dto.ts │ │ │ │ └── feishu.service.ts │ │ │ │ ├── user.controller.ts │ │ │ │ ├── user.dto.ts │ │ │ │ ├── user.module.ts │ │ │ │ ├── user.mysql.entity.ts │ │ │ │ ├── user.providers.ts │ │ │ │ └── user.service.ts │ │ │ ├── test │ │ │ ├── app.e2e-spec.ts │ │ │ └── jest-e2e.json │ │ │ └── tsconfig.app.json │ │ ├── build │ │ ├── Dockerfile │ │ ├── docker-compose.gateway-service-dev.yml │ │ ├── start.ts │ │ └── start_dev_service.sh │ │ ├── cli.config.js │ │ ├── clients │ │ └── materials │ │ │ ├── .babelrc │ │ │ ├── .gitignore │ │ │ ├── cli.config.js │ │ │ ├── cli.config.json │ │ │ ├── package.json │ │ │ ├── script │ │ │ └── webpack.config.js │ │ │ ├── src │ │ │ ├── App.tsx │ │ │ ├── base.less │ │ │ ├── index.tsx │ │ │ ├── router │ │ │ │ ├── NestedRoute.tsx │ │ │ │ └── index.ts │ │ │ └── util │ │ │ │ └── request.ts │ │ │ ├── temp_cache │ │ │ └── default-development │ │ │ │ └── index.pack.old │ │ │ ├── tpl │ │ │ └── index.html │ │ │ └── tsconfig.json │ │ ├── ecosystem.config.js │ │ ├── libs │ │ └── common │ │ │ ├── src │ │ │ ├── constants.ts │ │ │ ├── database │ │ │ │ ├── database.module.ts │ │ │ │ ├── database.providers.ts │ │ │ │ └── naming.strategies.ts │ │ │ ├── exceptions │ │ │ │ ├── base.exception.filter.ts │ │ │ │ ├── business.error.codes.ts │ │ │ │ ├── business.exception.ts │ │ │ │ ├── feishu.exception.ts │ │ │ │ └── http.exception.filter.ts │ │ │ ├── fastHook │ │ │ │ └── index.ts │ │ │ ├── helper │ │ │ │ ├── constants.ts │ │ │ │ ├── feishu │ │ │ │ │ ├── auth.ts │ │ │ │ │ ├── const.ts │ │ │ │ │ ├── message.ts │ │ │ │ │ ├── type.ts │ │ │ │ │ └── user.ts │ │ │ │ └── index.ts │ │ │ ├── index.ts │ │ │ ├── interceptors │ │ │ │ └── transform.interceptor.ts │ │ │ ├── logger │ │ │ │ ├── catchError.ts │ │ │ │ ├── fileStream.ts │ │ │ │ ├── index.ts │ │ │ │ ├── logStream.ts │ │ │ │ └── logger.ts │ │ │ └── utils │ │ │ │ ├── index.ts │ │ │ │ └── request.ts │ │ │ └── tsconfig.lib.json │ │ ├── nest-cli.json │ │ ├── package.json │ │ ├── pnpm-lock.yaml │ │ ├── pnpm-workspace.yaml │ │ ├── tsconfig.build.json │ │ ├── tsconfig.json │ │ ├── turbo.json │ │ ├── types │ │ ├── globle.d.ts │ │ └── type.ts │ │ └── webpack-hmr.config.js ├── ioc.js ├── jy_nest_gateway │ ├── .config │ │ ├── .dev.yaml │ │ ├── .prod.yaml │ │ └── .test.yaml │ ├── .env │ ├── .eslintrc.js │ ├── .gitignore │ ├── .prettierrc │ ├── README.md │ ├── helper │ │ ├── fs │ │ │ ├── auth.ts │ │ │ ├── const.ts │ │ │ ├── messages.ts │ │ │ ├── type.ts │ │ │ └── user.ts │ │ └── index.ts │ ├── nest-cli.json │ ├── package.json │ ├── pnpm-lock.yaml │ ├── src │ │ ├── app.controller.spec.ts │ │ ├── app.controller.ts │ │ ├── app.module.ts │ │ ├── app.service.ts │ │ ├── auth │ │ │ ├── auth.controller.spec.ts │ │ │ ├── auth.controller.ts │ │ │ ├── auth.module.ts │ │ │ ├── auth.service.spec.ts │ │ │ ├── auth.service.ts │ │ │ ├── constants.ts │ │ │ ├── dto │ │ │ │ ├── create-auth.dto.ts │ │ │ │ └── update-auth.dto.ts │ │ │ ├── entities │ │ │ │ └── auth.entity.ts │ │ │ ├── guards │ │ │ │ ├── fs.auth.guard.ts │ │ │ │ └── jwt-auth.guard.ts │ │ │ └── strategies │ │ │ │ ├── fs-auth.strategy.ts │ │ │ │ └── jwt-auth.strategy.ts │ │ ├── common │ │ │ ├── README.md │ │ │ ├── database │ │ │ │ ├── database.module.ts │ │ │ │ └── database.providers.ts │ │ │ ├── exceptions │ │ │ │ ├── business.error.codes.ts │ │ │ │ ├── business.exception.ts │ │ │ │ ├── exception.filter.ts │ │ │ │ └── http.exception.filter.ts │ │ │ ├── interceptors │ │ │ │ └── transform.interceptor.ts │ │ │ └── logger │ │ │ │ ├── catchError.ts │ │ │ │ ├── fileStream.ts │ │ │ │ ├── index.ts │ │ │ │ ├── logStream.ts │ │ │ │ └── logger.ts │ │ ├── doc.ts │ │ ├── main.ts │ │ ├── user │ │ │ ├── dto │ │ │ │ ├── create-user.dto.ts │ │ │ │ └── update-user.dto.ts │ │ │ ├── entities │ │ │ │ └── user.mongo.entity.ts │ │ │ ├── fs │ │ │ │ ├── fs.controller.ts │ │ │ │ ├── fs.dto.ts │ │ │ │ └── fs.service.ts │ │ │ ├── user.controller.spec.ts │ │ │ ├── user.controller.ts │ │ │ ├── user.module.ts │ │ │ ├── user.providers.ts │ │ │ ├── user.service.spec.ts │ │ │ └── user.service.ts │ │ └── utils │ │ │ ├── index.ts │ │ │ └── request.ts │ ├── test │ │ ├── app.e2e-spec.ts │ │ └── jest-e2e.json │ ├── tsconfig.build.json │ ├── tsconfig.json │ ├── types │ │ └── globle.d.ts │ └── webpack-hmr.config.js ├── 物料分类.webp └── 用户权限设计.webp ├── 21_Nest_v3 ├── Docker │ ├── .dockerignore │ ├── 2.Dockerfile │ ├── Dockerfile │ └── index.html ├── DockerNext │ ├── ARG.dockerfile │ ├── ARG.js │ ├── EntryPoint.dockerfile │ ├── aaa.tar.gz │ ├── copyadd.dockerfile │ ├── copyvsadd │ │ ├── 1111 │ │ └── 2222 │ └── pm2.dockerfile ├── Mysql │ ├── index.js │ ├── index.pool.js │ ├── index_promise.js │ ├── package.json │ └── pnpm-lock.yaml ├── PASS.MD ├── RBAC.jpg ├── README.md ├── Rxjs │ ├── index.js │ ├── package-lock.json │ └── package.json ├── access_token_and_refresh_token │ ├── .eslintrc.js │ ├── .prettierrc │ ├── README.md │ ├── nest-cli.json │ ├── package.json │ ├── pnpm-lock.yaml │ ├── src │ │ ├── app.controller.spec.ts │ │ ├── app.controller.ts │ │ ├── app.module.ts │ │ ├── app.service.ts │ │ ├── login.guard.ts │ │ ├── main.ts │ │ └── user │ │ │ ├── dto │ │ │ └── login-user.dto.ts │ │ │ ├── entities │ │ │ └── user.entity.ts │ │ │ ├── user.controller.ts │ │ │ ├── user.module.ts │ │ │ └── user.service.ts │ ├── test │ │ ├── app.e2e-spec.ts │ │ └── jest-e2e.json │ ├── tsconfig.build.json │ └── tsconfig.json ├── acl-test │ ├── .eslintrc.js │ ├── .prettierrc │ ├── nest-cli.json │ ├── package.json │ ├── pnpm-lock.yaml │ ├── src │ │ ├── aaa │ │ │ ├── aaa.controller.spec.ts │ │ │ ├── aaa.controller.ts │ │ │ ├── aaa.module.ts │ │ │ ├── aaa.service.spec.ts │ │ │ ├── aaa.service.ts │ │ │ ├── dto │ │ │ │ ├── create-aaa.dto.ts │ │ │ │ └── update-aaa.dto.ts │ │ │ └── entities │ │ │ │ └── aaa.entity.ts │ │ ├── app.controller.spec.ts │ │ ├── app.controller.ts │ │ ├── app.module.ts │ │ ├── app.service.ts │ │ ├── bbb │ │ │ ├── bbb.controller.spec.ts │ │ │ ├── bbb.controller.ts │ │ │ ├── bbb.module.ts │ │ │ ├── bbb.service.spec.ts │ │ │ ├── bbb.service.ts │ │ │ ├── dto │ │ │ │ ├── create-bbb.dto.ts │ │ │ │ └── update-bbb.dto.ts │ │ │ └── entities │ │ │ │ └── bbb.entity.ts │ │ ├── common │ │ │ ├── exceptions │ │ │ │ ├── business.error.codes.ts │ │ │ │ ├── business.exception.ts │ │ │ │ ├── exception.filter.ts │ │ │ │ └── http.exception.filter.ts │ │ │ └── interceptors │ │ │ │ └── global.interceptor.ts │ │ ├── login.guard.ts │ │ ├── main.ts │ │ ├── redis │ │ │ ├── redis.module.ts │ │ │ └── redis.service.ts │ │ └── user │ │ │ ├── dto │ │ │ └── login-user.dto.ts │ │ │ ├── entities │ │ │ ├── permission.entity.ts │ │ │ └── user.entity.ts │ │ │ ├── permission.guard.ts │ │ │ ├── user.controller.spec.ts │ │ │ ├── user.controller.ts │ │ │ ├── user.module.ts │ │ │ ├── user.service.spec.ts │ │ │ └── user.service.ts │ ├── test │ │ ├── app.e2e-spec.ts │ │ └── jest-e2e.json │ ├── tsconfig.build.json │ └── tsconfig.json ├── config-test │ ├── .env │ ├── .production.env │ ├── hello.yaml │ ├── index.js │ ├── index2.js │ ├── package.json │ └── pnpm-lock.yaml ├── docker-compose-test │ ├── .dockerignore │ ├── .eslintrc.js │ ├── .prettierrc │ ├── Dockerfile │ ├── docker-compose.yml │ ├── docker-compose_back.yml │ ├── nest-cli.json │ ├── package.json │ ├── pnpm-lock.yaml │ ├── src │ │ ├── app.controller.spec.ts │ │ ├── app.controller.ts │ │ ├── app.module.ts │ │ ├── app.service.ts │ │ ├── dc │ │ │ ├── dc.controller.ts │ │ │ ├── dc.module.ts │ │ │ ├── dc.service.ts │ │ │ ├── dto │ │ │ │ ├── create-dc.dto.ts │ │ │ │ └── update-dc.dto.ts │ │ │ └── entities │ │ │ │ └── dc.entity.ts │ │ └── main.ts │ ├── test │ │ ├── app.e2e-spec.ts │ │ └── jest-e2e.json │ ├── tsconfig.build.json │ └── tsconfig.json ├── docker-restart-test │ ├── dockerfile │ ├── index.js │ └── next.Dockerfile ├── dockerfile-test │ ├── .dockerignore │ ├── .eslintrc.js │ ├── .prettierrc │ ├── 1.dockerfile │ ├── 2.dockerfile │ ├── dockerfile │ ├── nest-cli.json │ ├── package.json │ ├── src │ │ ├── app.controller.spec.ts │ │ ├── app.controller.ts │ │ ├── app.module.ts │ │ ├── app.service.ts │ │ └── main.ts │ ├── test │ │ ├── app.e2e-spec.ts │ │ └── jest-e2e.json │ ├── tsconfig.build.json │ └── tsconfig.json ├── email-login-backend │ ├── .eslintrc.js │ ├── .gitignore │ ├── .prettierrc │ ├── README.md │ ├── nest-cli.json │ ├── package-lock.json │ ├── package.json │ ├── src │ │ ├── .env │ │ ├── app.controller.spec.ts │ │ ├── app.controller.ts │ │ ├── app.module.ts │ │ ├── app.service.ts │ │ ├── email │ │ │ ├── dto │ │ │ │ ├── create-email.dto.ts │ │ │ │ └── update-email.dto.ts │ │ │ ├── email.controller.spec.ts │ │ │ ├── email.controller.ts │ │ │ ├── email.module.ts │ │ │ ├── email.service.spec.ts │ │ │ ├── email.service.ts │ │ │ └── entities │ │ │ │ └── email.entity.ts │ │ ├── main.ts │ │ ├── redis │ │ │ ├── dto │ │ │ │ ├── create-redi.dto.ts │ │ │ │ └── update-redi.dto.ts │ │ │ ├── entities │ │ │ │ └── redi.entity.ts │ │ │ ├── redis.controller.ts │ │ │ ├── redis.module.ts │ │ │ └── redis.service.ts │ │ └── user │ │ │ ├── dto │ │ │ ├── create-user.dto.ts │ │ │ ├── login-user.dto.ts │ │ │ └── update-user.dto.ts │ │ │ ├── entities │ │ │ └── user.entity.ts │ │ │ ├── user.controller.spec.ts │ │ │ ├── user.controller.ts │ │ │ ├── user.module.ts │ │ │ ├── user.service.spec.ts │ │ │ └── user.service.ts │ ├── test │ │ ├── app.e2e-spec.ts │ │ └── jest-e2e.json │ ├── tsconfig.build.json │ └── tsconfig.json ├── email-login-frontend │ ├── .gitignore │ ├── README.md │ ├── package-lock.json │ ├── package.json │ ├── public │ │ ├── favicon.ico │ │ ├── index.html │ │ ├── logo192.png │ │ ├── logo512.png │ │ ├── manifest.json │ │ └── robots.txt │ └── src │ │ ├── App.js │ │ ├── index.js │ │ ├── reportWebVitals.js │ │ └── setupTests.js ├── exception-filter │ ├── .eslintrc.js │ ├── .gitignore │ ├── .prettierrc │ ├── README.md │ ├── nest-cli.json │ ├── package.json │ ├── pnpm-lock.yaml │ ├── src │ │ ├── app.controller.spec.ts │ │ ├── app.controller.ts │ │ ├── app.module.ts │ │ ├── app.service.ts │ │ ├── hello.filter.ts │ │ ├── main.ts │ │ └── unlogin.filter.ts │ ├── test │ │ ├── app.e2e-spec.ts │ │ └── jest-e2e.json │ ├── tsconfig.build.json │ └── tsconfig.json ├── express-upload │ ├── index.html │ ├── index.js │ ├── my-uploads │ │ └── aaa-1689520081407-938455620-WIN_20230701_14_59_38_Pro.jpg │ ├── package.json │ ├── pnpm-lock.yaml │ └── uploads │ │ ├── 0d8596f98556f39a3a2040edd8b7a5f5 │ │ └── 9a47aa63bb19b6522e0cfdbb05175b7b ├── jwt-and-session │ ├── .eslintrc.js │ ├── .gitignore │ ├── .prettierrc │ ├── README.md │ ├── nest-cli.json │ ├── package.json │ ├── pnpm-lock.yaml │ ├── src │ │ ├── app.controller.spec.ts │ │ ├── app.controller.ts │ │ ├── app.module.ts │ │ ├── app.service.ts │ │ └── main.ts │ ├── test │ │ ├── app.e2e-spec.ts │ │ └── jest-e2e.json │ ├── tsconfig.build.json │ └── tsconfig.json ├── login-and-register │ ├── .eslintrc.js │ ├── .gitignore │ ├── .prettierrc │ ├── README.md │ ├── nest-cli.json │ ├── package.json │ ├── pnpm-lock.yaml │ ├── src │ │ ├── app.controller.spec.ts │ │ ├── app.controller.ts │ │ ├── app.module.ts │ │ ├── app.service.ts │ │ ├── global │ │ │ └── global.interceptor.ts │ │ ├── login │ │ │ └── login.guard.ts │ │ ├── main.ts │ │ └── user │ │ │ ├── dto │ │ │ ├── create-user.dto.ts │ │ │ ├── login_dto.ts │ │ │ ├── register.dto.ts │ │ │ └── update-user.dto.ts │ │ │ ├── entities │ │ │ └── user.entity.ts │ │ │ ├── user.controller.spec.ts │ │ │ ├── user.controller.ts │ │ │ ├── user.module.ts │ │ │ ├── user.service.spec.ts │ │ │ └── user.service.ts │ ├── test │ │ ├── app.e2e-spec.ts │ │ └── jest-e2e.json │ ├── tsconfig.build.json │ └── tsconfig.json ├── nest-config-test │ ├── .aaa.env │ ├── .env │ ├── .eslintrc.js │ ├── .gitignore │ ├── .prettierrc │ ├── README.md │ ├── aaa.yaml │ ├── config.ts │ ├── config2.ts │ ├── nest-cli.json │ ├── package.json │ ├── pnpm-lock.yaml │ ├── src │ │ ├── app.controller.spec.ts │ │ ├── app.controller.ts │ │ ├── app.module.ts │ │ ├── app.service.ts │ │ ├── bbb │ │ │ ├── bbb.controller.ts │ │ │ ├── bbb.module.ts │ │ │ ├── bbb.service.ts │ │ │ ├── dto │ │ │ │ ├── create-bbb.dto.ts │ │ │ │ └── update-bbb.dto.ts │ │ │ └── entities │ │ │ │ └── bbb.entity.ts │ │ └── main.ts │ ├── test │ │ ├── app.e2e-spec.ts │ │ └── jest-e2e.json │ ├── tsconfig.build.json │ └── tsconfig.json ├── nest-redis │ ├── .eslintrc.js │ ├── .gitignore │ ├── .prettierrc │ ├── README.md │ ├── nest-cli.json │ ├── package.json │ ├── pnpm-lock.yaml │ ├── src │ │ ├── app.controller.spec.ts │ │ ├── app.controller.ts │ │ ├── app.module.ts │ │ ├── app.service.ts │ │ └── main.ts │ ├── test │ │ ├── app.e2e-spec.ts │ │ └── jest-e2e.json │ ├── tsconfig.build.json │ └── tsconfig.json ├── nest-typeorm │ ├── .eslintrc.js │ ├── .gitignore │ ├── .prettierrc │ ├── nest-cli.json │ ├── package.json │ ├── pnpm-lock.yaml │ ├── src │ │ ├── app.controller.spec.ts │ │ ├── app.controller.ts │ │ ├── app.module.ts │ │ ├── app.service.ts │ │ ├── main.ts │ │ └── user │ │ │ ├── dto │ │ │ ├── create-user.dto.ts │ │ │ └── update-user.dto.ts │ │ │ ├── entities │ │ │ └── user.entity.ts │ │ │ ├── user.controller.spec.ts │ │ │ ├── user.controller.ts │ │ │ ├── user.module.ts │ │ │ ├── user.service.spec.ts │ │ │ └── user.service.ts │ ├── test │ │ ├── app.e2e-spec.ts │ │ └── jest-e2e.json │ ├── tsconfig.build.json │ └── tsconfig.json ├── nginx-nest-app │ ├── .eslintrc.js │ ├── .prettierrc │ ├── nest-cli.json │ ├── package.json │ ├── pnpm-lock.yaml │ ├── src │ │ ├── app.controller.spec.ts │ │ ├── app.controller.ts │ │ ├── app.module.ts │ │ ├── app.service.ts │ │ └── main.ts │ ├── test │ │ ├── app.e2e-spec.ts │ │ └── jest-e2e.json │ ├── tsconfig.build.json │ └── tsconfig.json ├── nginx_gray_test │ ├── .eslintrc.js │ ├── .gitignore │ ├── .prettierrc │ ├── README.md │ ├── default.conf │ ├── nest-cli.json │ ├── package.json │ ├── pnpm-lock.yaml │ ├── src │ │ ├── app.controller.spec.ts │ │ ├── app.controller.ts │ │ ├── app.module.ts │ │ ├── app.service.ts │ │ └── main.ts │ ├── test │ │ ├── app.e2e-spec.ts │ │ └── jest-e2e.json │ ├── tsconfig.build.json │ └── tsconfig.json ├── node-email │ ├── package.json │ ├── pnpm-lock.yaml │ ├── receive.js │ ├── send.js │ └── test.html ├── pass │ ├── .eslintrc.js │ ├── .gitignore │ ├── .prettierrc │ ├── README.md │ ├── ecosystem.config.js │ ├── nest-cli.json │ ├── nest_upload.html │ ├── package.json │ ├── pnpm-lock.yaml │ ├── public │ │ └── index.html │ ├── src │ │ ├── aaa │ │ │ ├── aaa.controller.ts │ │ │ ├── aaa.module.ts │ │ │ ├── aaa.service.ts │ │ │ ├── dto │ │ │ │ ├── create-aaa.dto.ts │ │ │ │ └── update-aaa.dto.ts │ │ │ └── entities │ │ │ │ └── aaa.entity.ts │ │ ├── app.controller.spec.ts │ │ ├── app.controller.ts │ │ ├── app.module.ts │ │ ├── app.service.ts │ │ ├── bbb │ │ │ ├── bbb.controller.ts │ │ │ ├── bbb.module.ts │ │ │ ├── bbb.service.ts │ │ │ ├── dto │ │ │ │ ├── create-bbb.dto.ts │ │ │ │ └── update-bbb.dto.ts │ │ │ └── entities │ │ │ │ └── bbb.entity.ts │ │ ├── ccc │ │ │ ├── ccc.controller.ts │ │ │ ├── ccc.module.ts │ │ │ ├── ccc.service.ts │ │ │ ├── dto │ │ │ │ ├── create-ccc.dto.ts │ │ │ │ └── update-ccc.dto.ts │ │ │ └── entities │ │ │ │ └── ccc.entity.ts │ │ ├── custom-pipe │ │ │ └── custom-pipe.pipe.ts │ │ ├── customFileValidator │ │ │ └── customFileValidator.ts │ │ ├── customLogger │ │ │ └── MyLogger.ts │ │ ├── ddd │ │ │ ├── ddd.controller.ts │ │ │ ├── ddd.module.ts │ │ │ ├── ddd.service.ts │ │ │ ├── dto │ │ │ │ ├── create-ddd.dto.ts │ │ │ │ └── update-ddd.dto.ts │ │ │ └── entities │ │ │ │ └── ddd.entity.ts │ │ ├── decorator │ │ │ └── decorator.decorator.ts │ │ ├── dynamic-module │ │ │ ├── dto │ │ │ │ ├── create-dynamic-module.dto.ts │ │ │ │ └── update-dynamic-module.dto.ts │ │ │ ├── dynamic-module.controller.spec.ts │ │ │ ├── dynamic-module.controller.ts │ │ │ ├── dynamic-module.module.ts │ │ │ ├── dynamic-module.service.spec.ts │ │ │ ├── dynamic-module.service.ts │ │ │ └── entities │ │ │ │ └── dynamic-module.entity.ts │ │ ├── file-size-validation-pipe │ │ │ └── file-size-validation-pipe.pipe.ts │ │ ├── filter │ │ │ ├── AaaException.ts │ │ │ └── filter.filter.ts │ │ ├── filterguard │ │ │ └── filterguard.guard.ts │ │ ├── guard │ │ │ └── guard.guard.ts │ │ ├── logger │ │ │ ├── logger.module.ts │ │ │ └── logger2.module.ts │ │ ├── main.ts │ │ ├── md-guard │ │ │ └── md-guard.guard.ts │ │ ├── md-inter │ │ │ └── md-inter.interceptor.ts │ │ ├── midd │ │ │ └── midd.middleware.ts │ │ ├── modulea │ │ │ └── modulea.module.ts │ │ ├── moduleb │ │ │ └── moduleb.module.ts │ │ ├── person │ │ │ ├── dto │ │ │ │ ├── create-person.dto.ts │ │ │ │ └── update-person.dto.ts │ │ │ ├── entities │ │ │ │ └── person.entity.ts │ │ │ ├── person.controller.spec.ts │ │ │ ├── person.controller.ts │ │ │ ├── person.module.ts │ │ │ ├── person.service.spec.ts │ │ │ └── person.service.ts │ │ ├── provider-a │ │ │ └── provider-a.service.ts │ │ ├── provider-b │ │ │ └── provider-b.service.ts │ │ ├── role │ │ │ ├── role.decorator.ts │ │ │ └── role.ts │ │ ├── storage │ │ │ └── uploadStorage.ts │ │ ├── test-pipe │ │ │ ├── dto │ │ │ │ ├── create-test-pipe.dto.ts │ │ │ │ ├── ppp.dto.ts │ │ │ │ └── update-test-pipe.dto.ts │ │ │ ├── entities │ │ │ │ └── test-pipe.entity.ts │ │ │ ├── test-pipe.controller.spec.ts │ │ │ ├── test-pipe.controller.ts │ │ │ ├── test-pipe.module.ts │ │ │ ├── test-pipe.service.spec.ts │ │ │ └── test-pipe.service.ts │ │ ├── test-rxcatcherror │ │ │ └── test-rxcatcherror.interceptor.ts │ │ ├── test-rxmap │ │ │ └── test-rxmap.interceptor.ts │ │ ├── test-rxtap │ │ │ └── test-rxtap.interceptor.ts │ │ ├── testloggermodule │ │ │ ├── dto │ │ │ │ ├── create-testloggermodule.dto.ts │ │ │ │ └── update-testloggermodule.dto.ts │ │ │ ├── entities │ │ │ │ └── testloggermodule.entity.ts │ │ │ ├── testloggermodule.controller.spec.ts │ │ │ ├── testloggermodule.controller.ts │ │ │ ├── testloggermodule.module.ts │ │ │ ├── testloggermodule.service.spec.ts │ │ │ └── testloggermodule.service.ts │ │ ├── text-rx │ │ │ └── text-rx.interceptor.ts │ │ └── text-rxtimeout │ │ │ └── text-rxtimeout.interceptor.ts │ ├── test │ │ ├── app.e2e-spec.ts │ │ └── jest-e2e.json │ ├── testReflect.ts │ ├── tsconfig.build.json │ ├── tsconfig.json │ └── uploads │ │ ├── 0239c3afef41dc6cd47e8e3def358d20 │ │ ├── 287bb20105e93e445689f38316a044d0 │ │ ├── 72e46369ebfcdc5e2c093747b1d83b5b │ │ └── 8a0ee4af71b81603d8da4958a14cc1ef ├── qrcode-login │ ├── .eslintrc.js │ ├── .gitignore │ ├── .prettierrc │ ├── README.md │ ├── nest-cli.json │ ├── package.json │ ├── pnpm-lock.yaml │ ├── src │ │ ├── app.controller.spec.ts │ │ ├── app.controller.ts │ │ ├── app.module.ts │ │ ├── app.service.ts │ │ └── main.ts │ ├── static │ │ ├── confirm.html │ │ └── index.html │ ├── test │ │ ├── app.e2e-spec.ts │ │ └── jest-e2e.json │ ├── tsconfig.build.json │ └── tsconfig.json ├── rbac-test │ ├── .eslintrc.js │ ├── .prettierrc │ ├── README.md │ ├── nest-cli.json │ ├── package.json │ ├── pnpm-lock.yaml │ ├── src │ │ ├── aaa │ │ │ ├── aaa.controller.spec.ts │ │ │ ├── aaa.controller.ts │ │ │ ├── aaa.module.ts │ │ │ ├── aaa.service.spec.ts │ │ │ ├── aaa.service.ts │ │ │ ├── dto │ │ │ │ ├── create-aaa.dto.ts │ │ │ │ └── update-aaa.dto.ts │ │ │ └── entities │ │ │ │ └── aaa.entity.ts │ │ ├── app.controller.spec.ts │ │ ├── app.controller.ts │ │ ├── app.module.ts │ │ ├── app.service.ts │ │ ├── bbb │ │ │ ├── bbb.controller.spec.ts │ │ │ ├── bbb.controller.ts │ │ │ ├── bbb.module.ts │ │ │ ├── bbb.service.spec.ts │ │ │ ├── bbb.service.ts │ │ │ ├── dto │ │ │ │ ├── create-bbb.dto.ts │ │ │ │ └── update-bbb.dto.ts │ │ │ └── entities │ │ │ │ └── bbb.entity.ts │ │ ├── custom-decorator.ts │ │ ├── login.guard.ts │ │ ├── main.ts │ │ ├── permission.guard.ts │ │ └── user │ │ │ ├── dto │ │ │ └── user.login.dto.ts │ │ │ ├── entities │ │ │ ├── permission.entity.ts │ │ │ ├── role.entity.ts │ │ │ └── user.entity.ts │ │ │ ├── user.controller.spec.ts │ │ │ ├── user.controller.ts │ │ │ ├── user.module.ts │ │ │ ├── user.service.spec.ts │ │ │ └── user.service.ts │ ├── test │ │ ├── app.e2e-spec.ts │ │ └── jest-e2e.json │ ├── tsconfig.build.json │ └── tsconfig.json ├── redis-article-views │ ├── .eslintrc.js │ ├── .gitignore │ ├── .prettierrc │ ├── README.md │ ├── nest-cli.json │ ├── package.json │ ├── pnpm-lock.yaml │ ├── src │ │ ├── app.controller.spec.ts │ │ ├── app.controller.ts │ │ ├── app.module.ts │ │ ├── app.service.ts │ │ ├── article │ │ │ ├── article.controller.ts │ │ │ ├── article.module.ts │ │ │ ├── article.service.ts │ │ │ ├── dto │ │ │ │ ├── create-article.dto.ts │ │ │ │ └── update-article.dto.ts │ │ │ └── entities │ │ │ │ └── article.entity.ts │ │ ├── main.ts │ │ ├── redis │ │ │ ├── redis.module.ts │ │ │ ├── redis.service.spec.ts │ │ │ └── redis.service.ts │ │ ├── task │ │ │ ├── task.module.ts │ │ │ ├── task.service.spec.ts │ │ │ └── task.service.ts │ │ └── user │ │ │ ├── dto │ │ │ ├── create-user.dto.ts │ │ │ ├── login-user.dto.ts │ │ │ └── update-user.dto.ts │ │ │ ├── entities │ │ │ └── user.entity.ts │ │ │ ├── user.controller.ts │ │ │ ├── user.module.ts │ │ │ └── user.service.ts │ ├── test │ │ ├── app.e2e-spec.ts │ │ └── jest-e2e.json │ ├── tsconfig.build.json │ └── tsconfig.json ├── redis-nearby-search │ ├── .eslintrc.js │ ├── .gitignore │ ├── .prettierrc │ ├── README.md │ ├── nest-cli.json │ ├── package.json │ ├── pnpm-lock.yaml │ ├── src │ │ ├── app.controller.spec.ts │ │ ├── app.controller.ts │ │ ├── app.module.ts │ │ ├── app.service.ts │ │ ├── main.ts │ │ └── redis │ │ │ ├── redis.module.ts │ │ │ ├── redis.service.spec.ts │ │ │ └── redis.service.ts │ ├── test │ │ ├── app.e2e-spec.ts │ │ └── jest-e2e.json │ ├── tsconfig.build.json │ └── tsconfig.json ├── redis-node-test │ ├── index.js │ ├── ioredis.js │ ├── package.json │ └── pnpm-lock.yaml ├── redis-session-test │ ├── .eslintrc.js │ ├── .gitignore │ ├── .prettierrc │ ├── README.md │ ├── nest-cli.json │ ├── package.json │ ├── pnpm-lock.yaml │ ├── src │ │ ├── app.controller.spec.ts │ │ ├── app.controller.ts │ │ ├── app.module.ts │ │ ├── app.service.ts │ │ ├── main.ts │ │ ├── redis │ │ │ ├── redis.module.ts │ │ │ ├── redis.service.spec.ts │ │ │ └── redis.service.ts │ │ └── session │ │ │ ├── session.module.ts │ │ │ └── session.service.ts │ ├── test │ │ ├── app.e2e-spec.ts │ │ └── jest-e2e.json │ ├── tsconfig.build.json │ └── tsconfig.json ├── refresh_token_test │ ├── .gitignore │ ├── README.md │ ├── package-lock.json │ ├── package.json │ ├── public │ │ ├── favicon.ico │ │ ├── index.html │ │ ├── logo192.png │ │ ├── logo512.png │ │ ├── manifest.json │ │ └── robots.txt │ ├── src │ │ ├── App.css │ │ ├── App.test.tsx │ │ ├── App.tsx │ │ ├── index.css │ │ ├── index.tsx │ │ ├── logo.svg │ │ ├── react-app-env.d.ts │ │ ├── reportWebVitals.ts │ │ └── setupTests.ts │ └── tsconfig.json ├── repl-test │ ├── .eslintrc.js │ ├── .gitignore │ ├── .prettierrc │ ├── README.md │ ├── nest-cli.json │ ├── package.json │ ├── pnpm-lock.yaml │ ├── src │ │ ├── aaa │ │ │ ├── aaa.controller.spec.ts │ │ │ ├── aaa.controller.ts │ │ │ ├── aaa.module.ts │ │ │ ├── aaa.service.spec.ts │ │ │ ├── aaa.service.ts │ │ │ ├── dto │ │ │ │ ├── create-aaa.dto.ts │ │ │ │ └── update-aaa.dto.ts │ │ │ └── entities │ │ │ │ └── aaa.entity.ts │ │ ├── app.controller.spec.ts │ │ ├── app.controller.ts │ │ ├── app.module.ts │ │ ├── app.service.ts │ │ ├── bbb │ │ │ ├── bbb.controller.spec.ts │ │ │ ├── bbb.controller.ts │ │ │ ├── bbb.module.ts │ │ │ ├── bbb.service.spec.ts │ │ │ ├── bbb.service.ts │ │ │ ├── dto │ │ │ │ ├── create-bbb.dto.ts │ │ │ │ └── update-bbb.dto.ts │ │ │ └── entities │ │ │ │ └── bbb.entity.ts │ │ ├── main.ts │ │ └── repl.ts │ ├── test │ │ ├── app.e2e-spec.ts │ │ └── jest-e2e.json │ ├── tsconfig.build.json │ └── tsconfig.json ├── schedule-task │ ├── .eslintrc.js │ ├── .gitignore │ ├── .prettierrc │ ├── README.md │ ├── nest-cli.json │ ├── package.json │ ├── pnpm-lock.yaml │ ├── src │ │ ├── aaa │ │ │ ├── aaa.controller.spec.ts │ │ │ ├── aaa.controller.ts │ │ │ ├── aaa.module.ts │ │ │ ├── aaa.service.spec.ts │ │ │ ├── aaa.service.ts │ │ │ ├── dto │ │ │ │ ├── create-aaa.dto.ts │ │ │ │ └── update-aaa.dto.ts │ │ │ └── entities │ │ │ │ └── aaa.entity.ts │ │ ├── app.controller.spec.ts │ │ ├── app.controller.ts │ │ ├── app.module.ts │ │ ├── app.service.ts │ │ ├── main.ts │ │ └── task.service.ts │ ├── test │ │ ├── app.e2e-spec.ts │ │ └── jest-e2e.json │ ├── tsconfig.build.json │ └── tsconfig.json ├── sse-test-frontend │ ├── .gitignore │ ├── README.md │ ├── package-lock.json │ ├── package.json │ ├── public │ │ ├── favicon.ico │ │ ├── index.html │ │ ├── logo192.png │ │ ├── logo512.png │ │ ├── manifest.json │ │ └── robots.txt │ ├── src │ │ ├── App.css │ │ ├── App.test.tsx │ │ ├── App.tsx │ │ ├── index.css │ │ ├── index.tsx │ │ ├── logo.svg │ │ ├── react-app-env.d.ts │ │ ├── reportWebVitals.ts │ │ └── setupTests.ts │ └── tsconfig.json ├── sse-test │ ├── .eslintrc.js │ ├── .gitignore │ ├── .prettierrc │ ├── README.md │ ├── nest-cli.json │ ├── package.json │ ├── pnpm-lock.yaml │ ├── src │ │ ├── app.controller.spec.ts │ │ ├── app.controller.ts │ │ ├── app.module.ts │ │ ├── app.service.ts │ │ └── main.ts │ ├── test │ │ ├── app.e2e-spec.ts │ │ └── jest-e2e.json │ ├── tsconfig.build.json │ └── tsconfig.json ├── swagger-test │ ├── .eslintrc.js │ ├── .gitignore │ ├── .prettierrc │ ├── README.md │ ├── nest-cli.json │ ├── package.json │ ├── pnpm-lock.yaml │ ├── src │ │ ├── app.controller.spec.ts │ │ ├── app.controller.ts │ │ ├── app.module.ts │ │ ├── app.service.ts │ │ ├── ccc.dto.ts │ │ ├── ccc.vo.ts │ │ └── main.ts │ ├── test │ │ ├── app.e2e-spec.ts │ │ └── jest-e2e.json │ ├── tsconfig.build.json │ └── tsconfig.json ├── testDebug.js ├── typeorm │ ├── typeorm-all-feature │ │ ├── .gitignore │ │ ├── README.md │ │ ├── package-lock.json │ │ ├── package.json │ │ ├── src │ │ │ ├── data-source.ts │ │ │ ├── entity │ │ │ │ └── User.ts │ │ │ └── index.ts │ │ └── tsconfig.json │ ├── typeorm-mysql-test │ │ ├── .gitignore │ │ ├── README.md │ │ ├── package-lock.json │ │ ├── package.json │ │ ├── src │ │ │ ├── data-source.ts │ │ │ ├── entity │ │ │ │ └── User.ts │ │ │ └── index.ts │ │ └── tsconfig.json │ ├── typeorm-relation-mapping │ │ ├── .gitignore │ │ ├── README.md │ │ ├── package-lock.json │ │ ├── package.json │ │ ├── src │ │ │ ├── data-source.ts │ │ │ ├── entity │ │ │ │ ├── IdCard.ts │ │ │ │ └── User.ts │ │ │ └── index.ts │ │ └── tsconfig.json │ ├── typeorm-relation-mapping2 │ │ ├── .gitignore │ │ ├── README.md │ │ ├── package-lock.json │ │ ├── package.json │ │ ├── src │ │ │ ├── data-source.ts │ │ │ ├── entity │ │ │ │ ├── Department.ts │ │ │ │ ├── Employee.ts │ │ │ │ └── User.ts │ │ │ └── index.ts │ │ └── tsconfig.json │ └── typeorm-relation-mapping3 │ │ ├── .gitignore │ │ ├── README.md │ │ ├── package-lock.json │ │ ├── package.json │ │ ├── src │ │ ├── data-source.ts │ │ ├── entity │ │ │ ├── Article.ts │ │ │ ├── Tag.ts │ │ │ └── User.ts │ │ └── index.ts │ │ └── tsconfig.json ├── winston-log-server │ ├── .eslintrc.js │ ├── .gitignore │ ├── .prettierrc │ ├── README.md │ ├── nest-cli.json │ ├── package.json │ ├── pnpm-lock.yaml │ ├── src │ │ ├── app.controller.spec.ts │ │ ├── app.controller.ts │ │ ├── app.module.ts │ │ ├── app.service.ts │ │ └── main.ts │ ├── test │ │ ├── app.e2e-spec.ts │ │ └── jest-e2e.json │ ├── tsconfig.build.json │ └── tsconfig.json └── winston-test │ ├── index.js │ ├── package-lock.json │ └── package.json ├── 22_meeting_room_project ├── meeting_room_booking_system_backend │ ├── .eslintrc.js │ ├── .gitignore │ ├── .prettierrc │ ├── README.md │ ├── doc │ │ ├── LoginGuard.jpg │ │ ├── apis.jpg │ │ ├── database │ │ │ ├── meeting_rooms.jpg │ │ │ ├── user.jpg │ │ │ ├── 权限表permissions.jpg │ │ │ ├── 用户,预订-参会人,预定表,会议室表关系.jpg │ │ │ ├── 用户-角色中间表-user_roles.jpg │ │ │ ├── 角色-权限中间表-role_permissions.jpg │ │ │ ├── 角色相关表关系.jpg │ │ │ ├── 角色表.jpg │ │ │ ├── 预定表_bookings.jpg │ │ │ └── 预订-参会人表booking_attendees.jpg │ │ ├── requirementAnalysis.jpg │ │ └── technologyStack.jpg │ ├── nest-cli.json │ ├── package.json │ ├── pnpm-lock.yaml │ ├── src │ │ ├── .env │ │ ├── app.controller.spec.ts │ │ ├── app.controller.ts │ │ ├── app.module.ts │ │ ├── app.service.ts │ │ ├── custom-exception.filter.ts │ │ ├── custom.decorator.ts │ │ ├── email │ │ │ ├── email.controller.ts │ │ │ ├── email.module.ts │ │ │ └── email.service.ts │ │ ├── format-response.interceptor.ts │ │ ├── guard │ │ │ ├── login.guard.ts │ │ │ └── permission.guard.ts │ │ ├── invoke-record.interceptor.ts │ │ ├── main.ts │ │ ├── my-file-storage.ts │ │ ├── redis │ │ │ ├── redis.module.ts │ │ │ └── redis.service.ts │ │ ├── unlogin.filter.ts │ │ ├── user │ │ │ ├── RegisterUserDto.ts │ │ │ ├── dto │ │ │ │ ├── login-user.dto.ts │ │ │ │ ├── udpate-user.dto.ts │ │ │ │ └── update-user-password.dto.ts │ │ │ ├── entities │ │ │ │ ├── permission.entity.ts │ │ │ │ ├── role.entity.ts │ │ │ │ └── user.entity.ts │ │ │ ├── user.controller.ts │ │ │ ├── user.module.ts │ │ │ ├── user.service.ts │ │ │ └── vo │ │ │ │ ├── README.md │ │ │ │ ├── login-user.vo.ts │ │ │ │ ├── refresh-token.vo.ts │ │ │ │ ├── user-info.vo.ts │ │ │ │ └── user-list.vo.ts │ │ └── utils.ts │ ├── test │ │ ├── app.e2e-spec.ts │ │ └── jest-e2e.json │ ├── tsconfig.build.json │ └── tsconfig.json └── meeting_room_booking_system_frontend_user │ ├── .gitignore │ ├── README.md │ ├── package-lock.json │ ├── package.json │ ├── public │ ├── favicon.ico │ ├── index.html │ ├── logo192.png │ ├── logo512.png │ ├── manifest.json │ └── robots.txt │ ├── src │ ├── App.css │ ├── index.css │ ├── index.tsx │ ├── react-app-env.d.ts │ ├── reportWebVitals.ts │ ├── router │ │ └── index.tsx │ ├── service │ │ └── interfaces.ts │ ├── setupTests.ts │ ├── style │ │ ├── Login.css │ │ ├── index.css │ │ ├── register.css │ │ ├── update_info.css │ │ └── update_password.css │ └── views │ │ ├── Aaa.tsx │ │ ├── Bbb.tsx │ │ ├── ErrorPage.tsx │ │ ├── HeadPicUpload.tsx │ │ ├── Layout.tsx │ │ ├── Login.tsx │ │ ├── Register.tsx │ │ ├── UpdateInfo.tsx │ │ ├── UpdatePassword.tsx │ │ └── index.tsx │ └── tsconfig.json ├── 23_large-file-sharding-upload └── README.md ├── README.md ├── bigInt_middlewareSource └── koa │ └── koa-cors.md ├── commitlint.config.js ├── index.html ├── package-lock.json ├── package.json ├── pnpm-lock.yaml └── vod-upload-demo ├── .babelrc ├── README.md ├── lib ├── .DS_Store └── aliyun-upload-sdk │ ├── .DS_Store │ ├── aliyun-upload-sdk-1.5.4.min.js │ └── lib │ ├── aliyun-oss-sdk-6.17.1.min.js │ └── es6-promise.min.js ├── package-lock.json ├── package.json ├── src ├── App.vue ├── STSToken.vue ├── UploadAuth.vue ├── index.html └── main.js └── webpack.config.js /.husky/commit-msg: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | . "$(dirname -- "$0")/_/husky.sh" 3 | 4 | npx --no-install commitlint --edit 5 | -------------------------------------------------------------------------------- /01_文件操作/a.txt: -------------------------------------------------------------------------------- 1 | thunderchen888888 -------------------------------------------------------------------------------- /01_文件操作/file.js: -------------------------------------------------------------------------------- 1 | let fs = require('fs'); 2 | 3 | fs.readFile('./a.txt', 'utf-8', (err, data) => { 4 | if (!err) { 5 | console.log(data); 6 | let newData = data + '888'; 7 | fs.writeFile('./a.txt', newData, (err) => { 8 | if (!err) { 9 | console.log('追加成功'); 10 | } 11 | }); 12 | } 13 | }); 14 | -------------------------------------------------------------------------------- /01_文件操作/read.js: -------------------------------------------------------------------------------- 1 | let fs =require("fs") 2 | 3 | fs.readFile("./a.txt","utf8",(err,data) => { 4 | console.log(err); 5 | console.log(data); 6 | }) -------------------------------------------------------------------------------- /01_文件操作/write.js: -------------------------------------------------------------------------------- 1 | let fs =require("fs") 2 | fs.writeFile("./a.txt","thunderchen",(err) => { 3 | console.log(err); 4 | }) -------------------------------------------------------------------------------- /02_mycli/config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | // 可选择框架 3 | framwork:['express',"koa","egg"], 4 | //框架对应的下载地址 5 | framworkUrl:{ 6 | 'express':'https://github.com/expressjs/express.git', 7 | 'koa':'https://github.com/koajs/koa.git', 8 | 'egg':'https://github.com/eggjs/egg.git', 9 | } 10 | } -------------------------------------------------------------------------------- /02_mycli/lib/core/help.js: -------------------------------------------------------------------------------- 1 | const myhelp = function (program) { 2 | program.option('-f --framwork ', '设置框架,<>必填'); 3 | }; 4 | 5 | 6 | module.exports = myhelp -------------------------------------------------------------------------------- /02_mycli/lib/core/mycommander.js: -------------------------------------------------------------------------------- 1 | const myaction = require('./action.js'); 2 | 3 | const mycommander = function (program) { 4 | program 5 | .command('create [other...]') 6 | .alias('crt') //创建别名 7 | .description('创建项目') 8 | .action(myaction); 9 | }; 10 | 11 | module.exports = mycommander; 12 | -------------------------------------------------------------------------------- /02_mycli/test/chalk.js: -------------------------------------------------------------------------------- 1 | const chalk = require("chalk") 2 | 3 | chalk.blue("内容") 4 | 5 | chalk.red("内容") 6 | 7 | chalk.rgb(255,3,4)("内容") 8 | 9 | -------------------------------------------------------------------------------- /02_mycli/test/download.js: -------------------------------------------------------------------------------- 1 | const download = require('download-git-repo'); 2 | 3 | download( 4 | 'direct:https://github.com/vuejs/vue.git', 5 | './xxx', //放置的位置 6 | { 7 | clone: true, 8 | }, 9 | (err) => { 10 | console.log(err); 11 | }, 12 | ); 13 | -------------------------------------------------------------------------------- /02_mycli/test/inquirer.js: -------------------------------------------------------------------------------- 1 | import inquirer from 'inquirer'; 2 | inquirer 3 | .prompt([ 4 | { 5 | type: 'input', //问题类型 6 | name: 'user', 7 | message: '你的名字是什么?', 8 | }, 9 | ]) 10 | .then((answer) => { 11 | console.log(answer); 12 | }); 13 | -------------------------------------------------------------------------------- /02_mycli/test/ora.js: -------------------------------------------------------------------------------- 1 | const ora =require("ora") 2 | const spinner = ora().start() 3 | spinner.text = 'loading......' 4 | setTimeout(() => { 5 | console.log("thunderchen"); 6 | spinner.succeed("已经成功了~") 7 | 8 | spinner.fail("结束") 9 | 10 | spinner.info("结束") 11 | },3000) -------------------------------------------------------------------------------- /03_HttpServer/server.js: -------------------------------------------------------------------------------- 1 | let http = require('http'); 2 | 3 | let router = require('./router'); 4 | let server = http.createServer(); 5 | server.listen(9999, () => { 6 | console.log('http://localhost:9999'); 7 | }); 8 | 9 | server.on('request', function (req, res) { 10 | router(req, res); 11 | }); 12 | -------------------------------------------------------------------------------- /04_express/db.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/04_express/db.json -------------------------------------------------------------------------------- /04_express/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "04_express", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "keywords": [], 10 | "author": "", 11 | "license": "ISC", 12 | "dependencies": { 13 | "express": "^4.18.2" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /04_express/test.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "thunder", 3 | "age": 18, 4 | "height": 175, 5 | "where": "河北省保定市定兴县" 6 | } 7 | -------------------------------------------------------------------------------- /05_express-template/public/stylesheets/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding: 50px; 3 | font: 14px "Lucida Grande", Helvetica, Arial, sans-serif; 4 | } 5 | 6 | a { 7 | color: #00B7FF; 8 | } 9 | -------------------------------------------------------------------------------- /05_express-template/routes/index.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | 4 | /* GET home page. */ 5 | router.get('/', function(req, res, next) { 6 | res.render('index', { title: 'Express' }); 7 | }); 8 | 9 | module.exports = router; 10 | -------------------------------------------------------------------------------- /05_express-template/routes/users.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | 4 | /* GET users listing. */ 5 | router.get('/', function(req, res, next) { 6 | res.send('respond with a resource'); 7 | }); 8 | 9 | module.exports = router; 10 | -------------------------------------------------------------------------------- /05_express-template/views/error.jade: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | block content 4 | h1= message 5 | h2= error.status 6 | pre #{error.stack} 7 | -------------------------------------------------------------------------------- /05_express-template/views/index.jade: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | block content 4 | h1= title 5 | p Welcome to #{title} 6 | -------------------------------------------------------------------------------- /05_express-template/views/layout.jade: -------------------------------------------------------------------------------- 1 | doctype html 2 | html 3 | head 4 | title= title 5 | link(rel='stylesheet', href='/stylesheets/style.css') 6 | body 7 | block content 8 | -------------------------------------------------------------------------------- /06_mongoDB/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "mongodb": "^4.13.0" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /07_express-study/public/images/1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/07_express-study/public/images/1.pdf -------------------------------------------------------------------------------- /07_express-study/public/stylesheets/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding: 50px; 3 | font: 14px "Lucida Grande", Helvetica, Arial, sans-serif; 4 | } 5 | 6 | a { 7 | color: #00B7FF; 8 | } 9 | -------------------------------------------------------------------------------- /07_express-study/routes/index.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | // router.use((req,res,next) => { 4 | 5 | // next() 6 | // }) 7 | 8 | /* GET home page. */ 9 | router.get('/', function(req, res, next) { 10 | res.render('index', { title: 'Express' }); 11 | }); 12 | 13 | 14 | module.exports = router; 15 | -------------------------------------------------------------------------------- /07_express-study/routes/login.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | 4 | 5 | 6 | module.exports = router 7 | 8 | -------------------------------------------------------------------------------- /07_express-study/routes/users.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | 4 | /* GET users listing. */ 5 | router.get('/', function(req, res, next) { 6 | res.send('respond with a resource'); 7 | }); 8 | 9 | module.exports = router; 10 | -------------------------------------------------------------------------------- /07_express-study/routes/video.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | router.get("/list",(req,res) => { 4 | console.log(req.method); 5 | res.send("/video-list") 6 | }) 7 | 8 | 9 | 10 | module.exports = router 11 | 12 | -------------------------------------------------------------------------------- /07_express-study/views/error.jade: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | block content 4 | h1= message 5 | h2= error.status 6 | pre #{error.stack} 7 | -------------------------------------------------------------------------------- /07_express-study/views/index.jade: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | block content 4 | h1= title 5 | p Welcome to #{title} 6 | -------------------------------------------------------------------------------- /07_express-study/views/layout.jade: -------------------------------------------------------------------------------- 1 | doctype html 2 | html 3 | head 4 | title= title 5 | link(rel='stylesheet', href='/stylesheets/style.css') 6 | body 7 | block content 8 | -------------------------------------------------------------------------------- /08_express-base/controller/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/08_express-base/controller/index.js -------------------------------------------------------------------------------- /08_express-base/model/baseModel.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | createAt: { 3 | type: Date, 4 | default: Date.now() 5 | }, 6 | updateAt: { 7 | type: Date, 8 | default: Date.now() 9 | } 10 | } -------------------------------------------------------------------------------- /08_express-base/public/images/1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/08_express-base/public/images/1.pdf -------------------------------------------------------------------------------- /08_express-base/public/images/c558ab4c18149cfd8f0dd3e244117660.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/08_express-base/public/images/c558ab4c18149cfd8f0dd3e244117660.jpg -------------------------------------------------------------------------------- /08_express-base/public/stylesheets/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding: 50px; 3 | font: 14px "Lucida Grande", Helvetica, Arial, sans-serif; 4 | } 5 | 6 | a { 7 | color: #00B7FF; 8 | } 9 | -------------------------------------------------------------------------------- /08_express-base/routes/index.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | /* GET home page. */ 4 | router.use("/user",require("./users")) 5 | router.use("/video",require('./video')) 6 | 7 | module.exports = router; 8 | -------------------------------------------------------------------------------- /08_express-base/routes/login.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | 4 | 5 | 6 | module.exports = router 7 | 8 | -------------------------------------------------------------------------------- /08_express-base/util/md5.js: -------------------------------------------------------------------------------- 1 | const crypto = require('crypto') 2 | 3 | module.exports = str => { 4 | return crypto.createHash('md5') 5 | .update('by' + str) 6 | .digest('hex') 7 | } 8 | -------------------------------------------------------------------------------- /08_express-base/views/error.jade: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | block content 4 | h1= message 5 | h2= error.status 6 | pre #{error.stack} 7 | -------------------------------------------------------------------------------- /08_express-base/views/index.jade: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | block content 4 | h1= title 5 | p Welcome to #{title} 6 | -------------------------------------------------------------------------------- /08_express-base/views/layout.jade: -------------------------------------------------------------------------------- 1 | doctype html 2 | html 3 | head 4 | title= title 5 | link(rel='stylesheet', href='/stylesheets/style.css') 6 | body 7 | block content 8 | -------------------------------------------------------------------------------- /09_redis/baseCommand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/09_redis/baseCommand.png -------------------------------------------------------------------------------- /09_redis/baseString.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/09_redis/baseString.png -------------------------------------------------------------------------------- /09_redis/baseType.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/09_redis/baseType.png -------------------------------------------------------------------------------- /09_redis/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "09_node-redis", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "keywords": [], 10 | "author": "", 11 | "license": "ISC", 12 | "dependencies": { 13 | "ioredis": "^5.2.4" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /10_nginx/SSL.md: -------------------------------------------------------------------------------- 1 | ## nginx官网 2 | http://nginx.org/en/docs/http/configuring_https_servers.html -------------------------------------------------------------------------------- /12_koa/koa-test/app.js: -------------------------------------------------------------------------------- 1 | const Koa =require('koa') 2 | 3 | const app = new Koa() 4 | app.use(async ctx => { 5 | // ctx.body = "hello koa" 6 | let method = ctx.req.method 7 | let url = ctx.req.url 8 | console.log(method); 9 | console.log(url); 10 | 11 | }) 12 | 13 | app.listen(300,() => { 14 | console.log("http://127.0.0.1:300"); 15 | }) -------------------------------------------------------------------------------- /13_koa-base/model/baseModel.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | createAt: { 3 | type: Date, 4 | default: Date.now() 5 | }, 6 | updateAt: { 7 | type: Date, 8 | default: Date.now() 9 | } 10 | } -------------------------------------------------------------------------------- /13_koa-base/public/stylesheets/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding: 50px; 3 | font: 14px "Lucida Grande", Helvetica, Arial, sans-serif; 4 | } 5 | 6 | a { 7 | color: #00B7FF; 8 | } 9 | -------------------------------------------------------------------------------- /13_koa-base/routes/users.js: -------------------------------------------------------------------------------- 1 | const router = require('koa-router')() 2 | 3 | router.prefix('/users') 4 | 5 | router.get('/', function (ctx, next) { 6 | ctx.body = 'this is a users response!' 7 | }) 8 | 9 | router.get('/bar', function (ctx, next) { 10 | ctx.body = 'this is a users/bar response' 11 | }) 12 | 13 | module.exports = router 14 | -------------------------------------------------------------------------------- /13_koa-base/util/md5.js: -------------------------------------------------------------------------------- 1 | const crypto = require('crypto') 2 | 3 | module.exports = str => { 4 | return crypto.createHash('md5') 5 | .update('by' + str) 6 | .digest('hex') 7 | } 8 | -------------------------------------------------------------------------------- /13_koa-base/views/error.pug: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | block content 4 | h1= message 5 | h2= error.status 6 | pre #{error.stack} 7 | -------------------------------------------------------------------------------- /13_koa-base/views/index.pug: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | block content 4 | h1= title 5 | p Welcome to #{title} 6 | -------------------------------------------------------------------------------- /13_koa-base/views/layout.pug: -------------------------------------------------------------------------------- 1 | doctype html 2 | html 3 | head 4 | title= title 5 | link(rel='stylesheet', href='/stylesheets/style.css') 6 | body 7 | block content 8 | -------------------------------------------------------------------------------- /14_EventLoop/01_JavaScript代码的执行流程.js: -------------------------------------------------------------------------------- 1 | const message = "Hello World"; 2 | 3 | console.log(message); 4 | 5 | function sum(num1, num2) { 6 | return num1 + num2; 7 | } 8 | 9 | function foo() { 10 | const result = sum(20, 30); 11 | console.log(result); 12 | } 13 | 14 | foo(); 15 | -------------------------------------------------------------------------------- /14_EventLoop/02_JavaScript异步setTimeout.js: -------------------------------------------------------------------------------- 1 | const message = "Hello World"; 2 | 3 | console.log(message); 4 | 5 | function sum(num1, num2) { 6 | return num1 + num2; 7 | } 8 | 9 | function foo() { 10 | const result = sum(20, 30); 11 | console.log(result); 12 | } 13 | 14 | setTimeout(() => { 15 | console.log("setTimeout"); 16 | }, 1000); 17 | 18 | foo(); 19 | -------------------------------------------------------------------------------- /14_EventLoop/06_Node队列任务面试题二.js: -------------------------------------------------------------------------------- 1 | setTimeout(() => { 2 | console.log("setTimeout"); 3 | }, 0); 4 | 5 | setImmediate(() => { 6 | console.log("setImmediate"); 7 | }); 8 | 9 | // 问题: setTimeout setImmediate -------------------------------------------------------------------------------- /15_koaVSexpress/express_void.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/15_koaVSexpress/express_void.png -------------------------------------------------------------------------------- /15_koaVSexpress/koa_promise.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/15_koaVSexpress/koa_promise.png -------------------------------------------------------------------------------- /15_koaVSexpress/onion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/15_koaVSexpress/onion.png -------------------------------------------------------------------------------- /16_Egg/.eslintignore: -------------------------------------------------------------------------------- 1 | coverage 2 | -------------------------------------------------------------------------------- /16_Egg/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "eslint-config-egg", 3 | "root": true 4 | } 5 | -------------------------------------------------------------------------------- /16_Egg/.gitignore: -------------------------------------------------------------------------------- 1 | logs/ 2 | npm-debug.log 3 | yarn-error.log 4 | node_modules/ 5 | *-lock.json 6 | *-lock.yaml 7 | yarn.lock 8 | coverage/ 9 | .idea/ 10 | run/ 11 | .DS_Store 12 | *.sw* 13 | *.un~ 14 | typings/ 15 | .nyc_output/ 16 | -------------------------------------------------------------------------------- /16_Egg/app/controller/home.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const { Controller } = require('egg'); 4 | 5 | class HomeController extends Controller { 6 | async index() { 7 | const { ctx, service } = this; 8 | const userData = service.user.getUserList(); 9 | ctx.body = userData; 10 | } 11 | } 12 | 13 | module.exports = HomeController; 14 | -------------------------------------------------------------------------------- /16_Egg/app/router.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * @param {Egg.Application} app - egg application 5 | */ 6 | module.exports = app => { 7 | const { router, controller } = app; 8 | router.get('/', controller.home.index); 9 | }; 10 | -------------------------------------------------------------------------------- /16_Egg/config/plugin.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** @type Egg.EggPlugin */ 4 | module.exports = { 5 | // had enabled by egg 6 | // static: { 7 | // enable: true, 8 | // } 9 | }; 10 | -------------------------------------------------------------------------------- /16_Egg/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "include": [ 3 | "**/*" 4 | ] 5 | } -------------------------------------------------------------------------------- /17_egg-base/.eslintignore: -------------------------------------------------------------------------------- 1 | coverage 2 | -------------------------------------------------------------------------------- /17_egg-base/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "eslint-config-egg", 3 | "root": true 4 | } 5 | -------------------------------------------------------------------------------- /17_egg-base/.gitignore: -------------------------------------------------------------------------------- 1 | logs/ 2 | npm-debug.log 3 | yarn-error.log 4 | node_modules/ 5 | *-lock.json 6 | *-lock.yaml 7 | yarn.lock 8 | coverage/ 9 | .idea/ 10 | run/ 11 | .DS_Store 12 | *.sw* 13 | *.un~ 14 | typings/ 15 | .nyc_output/ 16 | -------------------------------------------------------------------------------- /17_egg-base/app/controller/home.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const { Controller } = require('egg'); 4 | 5 | class HomeController extends Controller { 6 | async index() { 7 | const { ctx } = this; 8 | const userInfo = await this.app.model.User.find(); 9 | ctx.body = userInfo; 10 | } 11 | } 12 | 13 | module.exports = HomeController; 14 | -------------------------------------------------------------------------------- /17_egg-base/app/extend/helper.js: -------------------------------------------------------------------------------- 1 | const crypto = require('crypto'); 2 | 3 | exports.md5 = str => { 4 | 5 | return crypto.createHash('md5').update(str).digest('hex'); 6 | 7 | }; 8 | -------------------------------------------------------------------------------- /17_egg-base/app/model/baseModel.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | createAt: { 3 | type: Date, 4 | default: Date.now(), 5 | }, 6 | updateAt: { 7 | type: Date, 8 | default: Date.now(), 9 | }, 10 | }; 11 | -------------------------------------------------------------------------------- /17_egg-base/config/plugin.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** @type Egg.EggPlugin */ 4 | 5 | exports.mongoose = { 6 | enable: true, 7 | package: 'egg-mongoose', 8 | }; 9 | 10 | exports.validate = { 11 | enable: true, 12 | package: 'egg-validate', 13 | }; 14 | -------------------------------------------------------------------------------- /17_egg-base/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "include": [ 3 | "**/*" 4 | ] 5 | } -------------------------------------------------------------------------------- /18_Nest/nest-test/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "trailingComma": "all" 4 | } -------------------------------------------------------------------------------- /18_Nest/nest-test/nest-cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/nest-cli", 3 | "collection": "@nestjs/schematics", 4 | "sourceRoot": "src", 5 | "compilerOptions": { 6 | "deleteOutDir": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /18_Nest/nest-test/src/app.controller.ts: -------------------------------------------------------------------------------- 1 | import { Controller, Get } from '@nestjs/common'; 2 | import { AppService } from './app.service'; 3 | 4 | @Controller() 5 | export class AppController { 6 | constructor(private readonly appService: AppService) {} 7 | 8 | @Get() 9 | getHello(): string { 10 | return this.appService.getHello(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /18_Nest/nest-test/src/app.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@nestjs/common'; 2 | 3 | @Injectable() 4 | export class AppService { 5 | getHello(): string { 6 | return 'Hello World!'; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /18_Nest/nest-test/src/user.controller.ts: -------------------------------------------------------------------------------- 1 | import { Controller, Get } from '@nestjs/common'; 2 | 3 | @Controller() 4 | export class UserController { 5 | @Get('/user') 6 | getHello(): string { 7 | return 'my nest'; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /18_Nest/nest-test/src/users/dto/update-user.dto.ts: -------------------------------------------------------------------------------- 1 | import { PartialType } from '@nestjs/mapped-types'; 2 | import { CreateUserDto } from './create-user.dto'; 3 | 4 | export class UpdateUserDto extends PartialType(CreateUserDto) {} 5 | -------------------------------------------------------------------------------- /18_Nest/nest-test/src/users/entities/user.entity.ts: -------------------------------------------------------------------------------- 1 | export class User {} 2 | -------------------------------------------------------------------------------- /18_Nest/nest-test/src/video/video.controller.ts: -------------------------------------------------------------------------------- 1 | import { Controller } from '@nestjs/common'; 2 | 3 | @Controller('video') 4 | export class VideoController {} 5 | -------------------------------------------------------------------------------- /18_Nest/nest-test/src/video/video.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { VideoController } from './video.controller'; 3 | import { VideoService } from './video.service'; 4 | 5 | @Module({ 6 | controllers: [VideoController], 7 | providers: [VideoService] 8 | }) 9 | export class VideoModule {} 10 | -------------------------------------------------------------------------------- /18_Nest/nest-test/src/video/video.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@nestjs/common'; 2 | 3 | @Injectable() 4 | export class VideoService {} 5 | -------------------------------------------------------------------------------- /18_Nest/nest-test/test/jest-e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "moduleFileExtensions": ["js", "json", "ts"], 3 | "rootDir": ".", 4 | "testEnvironment": "node", 5 | "testRegex": ".e2e-spec.ts$", 6 | "transform": { 7 | "^.+\\.(t|j)s$": "ts-jest" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /18_Nest/nest-test/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "exclude": ["node_modules", "test", "dist", "**/*spec.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /18_Nest/nest_study_xm/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "trailingComma": "all" 4 | } -------------------------------------------------------------------------------- /18_Nest/nest_study_xm/nest-cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/nest-cli", 3 | "collection": "@nestjs/schematics", 4 | "sourceRoot": "src", 5 | "compilerOptions": { 6 | "deleteOutDir": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /18_Nest/nest_study_xm/src/app.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@nestjs/common'; 2 | 3 | @Injectable() 4 | export class AppService { 5 | getHello(): string { 6 | return 'Hello World!'; 7 | } 8 | 9 | getName() { 10 | return 'thunderchen'; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /18_Nest/nest_study_xm/src/demo/demo.controller.ts: -------------------------------------------------------------------------------- 1 | import { Controller } from '@nestjs/common'; 2 | 3 | @Controller('demo') 4 | export class DemoController {} 5 | -------------------------------------------------------------------------------- /18_Nest/nest_study_xm/src/demo/demo.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { DemoService } from './demo.service'; 3 | 4 | @Module({ 5 | providers: [DemoService], 6 | }) 7 | export class DemoModule {} 8 | -------------------------------------------------------------------------------- /18_Nest/nest_study_xm/src/demo/demo.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@nestjs/common'; 2 | 3 | @Injectable() 4 | export class DemoService {} 5 | -------------------------------------------------------------------------------- /18_Nest/nest_study_xm/src/guard/dto/create-guard.dto.ts: -------------------------------------------------------------------------------- 1 | import { ApiProperty } from '@nestjs/swagger'; 2 | 3 | export class CreateGuardDto { 4 | @ApiProperty({ example: '小满' }) 5 | name: string; 6 | @ApiProperty({ example: 19 }) 7 | age: number; 8 | } 9 | -------------------------------------------------------------------------------- /18_Nest/nest_study_xm/src/guard/dto/update-guard.dto.ts: -------------------------------------------------------------------------------- 1 | import { PartialType } from '@nestjs/mapped-types'; 2 | import { CreateGuardDto } from './create-guard.dto'; 3 | 4 | export class UpdateGuardDto extends PartialType(CreateGuardDto) {} 5 | -------------------------------------------------------------------------------- /18_Nest/nest_study_xm/src/guard/entities/guard.entity.ts: -------------------------------------------------------------------------------- 1 | export class Guard {} 2 | -------------------------------------------------------------------------------- /18_Nest/nest_study_xm/src/guard/guard.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { GuardService } from './guard.service'; 3 | import { GuardController } from './guard.controller'; 4 | 5 | @Module({ 6 | controllers: [GuardController], 7 | providers: [GuardService] 8 | }) 9 | export class GuardModule {} 10 | -------------------------------------------------------------------------------- /18_Nest/nest_study_xm/src/guard/role/role.guard.spec.ts: -------------------------------------------------------------------------------- 1 | import { RoleGuard } from './role.guard'; 2 | 3 | describe('RoleGuard', () => { 4 | it('should be defined', () => { 5 | expect(new RoleGuard()).toBeDefined(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /18_Nest/nest_study_xm/src/list/dto/create-list.dto.ts: -------------------------------------------------------------------------------- 1 | export class CreateListDto {} 2 | -------------------------------------------------------------------------------- /18_Nest/nest_study_xm/src/list/dto/update-list.dto.ts: -------------------------------------------------------------------------------- 1 | import { PartialType } from '@nestjs/mapped-types'; 2 | import { CreateListDto } from './create-list.dto'; 3 | 4 | export class UpdateListDto extends PartialType(CreateListDto) {} 5 | -------------------------------------------------------------------------------- /18_Nest/nest_study_xm/src/list/entities/list.entity.ts: -------------------------------------------------------------------------------- 1 | export class List {} 2 | -------------------------------------------------------------------------------- /18_Nest/nest_study_xm/src/list/list.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { ListService } from './list.service'; 3 | import { ListController } from './list.controller'; 4 | 5 | @Module({ 6 | controllers: [ListController], 7 | providers: [ListService], 8 | exports: [ListService], 9 | }) 10 | export class ListModule {} 11 | -------------------------------------------------------------------------------- /18_Nest/nest_study_xm/src/logger/logger.middleware.spec.ts: -------------------------------------------------------------------------------- 1 | import { LoggerMiddleware } from './logger.middleware'; 2 | 3 | describe('LoggerMiddleware', () => { 4 | it('should be defined', () => { 5 | expect(new LoggerMiddleware()).toBeDefined(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /18_Nest/nest_study_xm/src/login/dto/create-login.dto.ts: -------------------------------------------------------------------------------- 1 | import { IsNotEmpty, IsString, Length, IsNumber } from 'class-validator'; 2 | 3 | export class CreateLoginDto { 4 | @IsNotEmpty() 5 | @IsString() 6 | @Length(5, 10, { 7 | message: '不能超过10个字符', 8 | }) 9 | name: string; 10 | @IsNumber() 11 | age: number; 12 | } 13 | -------------------------------------------------------------------------------- /18_Nest/nest_study_xm/src/login/dto/update-login.dto.ts: -------------------------------------------------------------------------------- 1 | import { PartialType } from '@nestjs/mapped-types'; 2 | import { CreateLoginDto } from './create-login.dto'; 3 | 4 | export class UpdateLoginDto extends PartialType(CreateLoginDto) {} 5 | -------------------------------------------------------------------------------- /18_Nest/nest_study_xm/src/login/entities/login.entity.ts: -------------------------------------------------------------------------------- 1 | export class Login {} 2 | -------------------------------------------------------------------------------- /18_Nest/nest_study_xm/src/login/login.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { LoginService } from './login.service'; 3 | import { LoginController } from './login.controller'; 4 | 5 | @Module({ 6 | controllers: [LoginController], 7 | providers: [LoginService] 8 | }) 9 | export class LoginModule {} 10 | -------------------------------------------------------------------------------- /18_Nest/nest_study_xm/src/login/login/login.pipe.spec.ts: -------------------------------------------------------------------------------- 1 | import { LoginPipe } from './login.pipe'; 2 | 3 | describe('LoginPipe', () => { 4 | it('should be defined', () => { 5 | expect(new LoginPipe()).toBeDefined(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /18_Nest/nest_study_xm/src/mysql/dto/create-mysql.dto.ts: -------------------------------------------------------------------------------- 1 | export class CreateMysqlDto {} 2 | -------------------------------------------------------------------------------- /18_Nest/nest_study_xm/src/mysql/dto/update-mysql.dto.ts: -------------------------------------------------------------------------------- 1 | import { PartialType } from '@nestjs/swagger'; 2 | import { CreateMysqlDto } from './create-mysql.dto'; 3 | 4 | export class UpdateMysqlDto extends PartialType(CreateMysqlDto) {} 5 | -------------------------------------------------------------------------------- /18_Nest/nest_study_xm/src/p/dto/create-p.dto.ts: -------------------------------------------------------------------------------- 1 | export class CreatePDto {} 2 | -------------------------------------------------------------------------------- /18_Nest/nest_study_xm/src/p/dto/update-p.dto.ts: -------------------------------------------------------------------------------- 1 | import { PartialType } from '@nestjs/mapped-types'; 2 | import { CreatePDto } from './create-p.dto'; 3 | 4 | export class UpdatePDto extends PartialType(CreatePDto) {} 5 | -------------------------------------------------------------------------------- /18_Nest/nest_study_xm/src/p/entities/p.entity.ts: -------------------------------------------------------------------------------- 1 | export class P {} 2 | -------------------------------------------------------------------------------- /18_Nest/nest_study_xm/src/p/p.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { PService } from './p.service'; 3 | import { PController } from './p.controller'; 4 | 5 | @Module({ 6 | controllers: [PController], 7 | providers: [PService] 8 | }) 9 | export class PModule {} 10 | -------------------------------------------------------------------------------- /18_Nest/nest_study_xm/src/spider/dto/create-spider.dto.ts: -------------------------------------------------------------------------------- 1 | export class CreateSpiderDto {} 2 | -------------------------------------------------------------------------------- /18_Nest/nest_study_xm/src/spider/dto/update-spider.dto.ts: -------------------------------------------------------------------------------- 1 | import { PartialType } from '@nestjs/mapped-types'; 2 | import { CreateSpiderDto } from './create-spider.dto'; 3 | 4 | export class UpdateSpiderDto extends PartialType(CreateSpiderDto) {} 5 | -------------------------------------------------------------------------------- /18_Nest/nest_study_xm/src/spider/entities/spider.entity.ts: -------------------------------------------------------------------------------- 1 | export class Spider {} 2 | -------------------------------------------------------------------------------- /18_Nest/nest_study_xm/src/spider/spider.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { SpiderService } from './spider.service'; 3 | import { SpiderController } from './spider.controller'; 4 | 5 | @Module({ 6 | controllers: [SpiderController], 7 | providers: [SpiderService] 8 | }) 9 | export class SpiderModule {} 10 | -------------------------------------------------------------------------------- /18_Nest/nest_study_xm/src/upload/dto/create-upload.dto.ts: -------------------------------------------------------------------------------- 1 | export class CreateUploadDto {} 2 | -------------------------------------------------------------------------------- /18_Nest/nest_study_xm/src/upload/dto/update-upload.dto.ts: -------------------------------------------------------------------------------- 1 | import { PartialType } from '@nestjs/mapped-types'; 2 | import { CreateUploadDto } from './create-upload.dto'; 3 | 4 | export class UpdateUploadDto extends PartialType(CreateUploadDto) {} 5 | -------------------------------------------------------------------------------- /18_Nest/nest_study_xm/src/upload/entities/upload.entity.ts: -------------------------------------------------------------------------------- 1 | export class Upload {} 2 | -------------------------------------------------------------------------------- /18_Nest/nest_study_xm/src/user/dto/create-user.dto.ts: -------------------------------------------------------------------------------- 1 | export class CreateUserDto {} 2 | -------------------------------------------------------------------------------- /18_Nest/nest_study_xm/src/user/dto/update-user.dto.ts: -------------------------------------------------------------------------------- 1 | import { PartialType } from '@nestjs/mapped-types'; 2 | import { CreateUserDto } from './create-user.dto'; 3 | 4 | export class UpdateUserDto extends PartialType(CreateUserDto) {} 5 | -------------------------------------------------------------------------------- /18_Nest/nest_study_xm/src/user/entities/user.entity.ts: -------------------------------------------------------------------------------- 1 | export class User {} 2 | -------------------------------------------------------------------------------- /18_Nest/nest_study_xm/test/jest-e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "moduleFileExtensions": ["js", "json", "ts"], 3 | "rootDir": ".", 4 | "testEnvironment": "node", 5 | "testRegex": ".e2e-spec.ts$", 6 | "transform": { 7 | "^.+\\.(t|j)s$": "ts-jest" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /18_Nest/nest_study_xm/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "exclude": ["node_modules", "test", "dist", "**/*spec.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /18_Nest/nest_xm_project/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "trailingComma": "all" 4 | } -------------------------------------------------------------------------------- /18_Nest/nest_xm_project/nest-cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/nest-cli", 3 | "collection": "@nestjs/schematics", 4 | "sourceRoot": "src", 5 | "compilerOptions": { 6 | "deleteOutDir": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /18_Nest/nest_xm_project/src/app.controller.ts: -------------------------------------------------------------------------------- 1 | import { Controller, Get } from '@nestjs/common'; 2 | import { AppService } from './app.service'; 3 | 4 | @Controller() 5 | export class AppController { 6 | constructor(private readonly appService: AppService) {} 7 | 8 | @Get() 9 | getHello(): string { 10 | return this.appService.getHello(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /18_Nest/nest_xm_project/src/app.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@nestjs/common'; 2 | 3 | @Injectable() 4 | export class AppService { 5 | getHello(): string { 6 | return 'Hello World!'; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /18_Nest/nest_xm_project/src/main.ts: -------------------------------------------------------------------------------- 1 | import { NestFactory } from '@nestjs/core'; 2 | import { AppModule } from './app.module'; 3 | 4 | async function bootstrap() { 5 | const app = await NestFactory.create(AppModule); 6 | await app.listen(3000); 7 | } 8 | bootstrap(); 9 | -------------------------------------------------------------------------------- /18_Nest/nest_xm_project/src/manger/dto/create-manger.dto.ts: -------------------------------------------------------------------------------- 1 | export class CreateMangerDto {} 2 | -------------------------------------------------------------------------------- /18_Nest/nest_xm_project/src/manger/dto/update-manger.dto.ts: -------------------------------------------------------------------------------- 1 | import { PartialType } from '@nestjs/mapped-types'; 2 | import { CreateMangerDto } from './create-manger.dto'; 3 | 4 | export class UpdateMangerDto extends PartialType(CreateMangerDto) {} 5 | -------------------------------------------------------------------------------- /18_Nest/nest_xm_project/src/manger/entities/manger.entity.ts: -------------------------------------------------------------------------------- 1 | export class Manger {} 2 | -------------------------------------------------------------------------------- /18_Nest/nest_xm_project/src/manger/manger.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { MangerService } from './manger.service'; 3 | import { MangerController } from './manger.controller'; 4 | 5 | @Module({ 6 | controllers: [MangerController], 7 | providers: [MangerService] 8 | }) 9 | export class MangerModule {} 10 | -------------------------------------------------------------------------------- /18_Nest/nest_xm_project/src/user/dto/create-user.dto.ts: -------------------------------------------------------------------------------- 1 | export class CreateUserDto {} 2 | -------------------------------------------------------------------------------- /18_Nest/nest_xm_project/src/user/dto/update-user.dto.ts: -------------------------------------------------------------------------------- 1 | import { PartialType } from '@nestjs/mapped-types'; 2 | import { CreateUserDto } from './create-user.dto'; 3 | 4 | export class UpdateUserDto extends PartialType(CreateUserDto) {} 5 | -------------------------------------------------------------------------------- /18_Nest/nest_xm_project/src/user/entities/user.entity.ts: -------------------------------------------------------------------------------- 1 | export class User {} 2 | -------------------------------------------------------------------------------- /18_Nest/nest_xm_project/src/user/user.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { UserService } from './user.service'; 3 | import { UserController } from './user.controller'; 4 | 5 | @Module({ 6 | controllers: [UserController], 7 | providers: [UserService] 8 | }) 9 | export class UserModule {} 10 | -------------------------------------------------------------------------------- /18_Nest/nest_xm_project/test/jest-e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "moduleFileExtensions": ["js", "json", "ts"], 3 | "rootDir": ".", 4 | "testEnvironment": "node", 5 | "testRegex": ".e2e-spec.ts$", 6 | "transform": { 7 | "^.+\\.(t|j)s$": "ts-jest" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /18_Nest/nest_xm_project/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "exclude": ["node_modules", "test", "dist", "**/*spec.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /19_NodeApi/01_fs/05_文件夹重命名.js: -------------------------------------------------------------------------------- 1 | const fs = require("fs") 2 | 3 | fs.rename("./thunder","./chen",(err) => { 4 | console.log("重命名结果:" , err); 5 | }) 6 | 7 | //对文件进行重命名 8 | fs.rename("./ccc/txt","./ddd.txt",(err) => { 9 | console.log("重命名结果:",err); 10 | }) -------------------------------------------------------------------------------- /19_NodeApi/01_fs/abc.txt: -------------------------------------------------------------------------------- 1 | hello thunder chen -------------------------------------------------------------------------------- /19_NodeApi/01_fs/ddd.txt: -------------------------------------------------------------------------------- 1 | hello thunder chenhello thunder chenhello thunder chen -------------------------------------------------------------------------------- /19_NodeApi/01_fs/flag.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/19_NodeApi/01_fs/flag.jpg -------------------------------------------------------------------------------- /19_NodeApi/01_fs/qwe.txt: -------------------------------------------------------------------------------- 1 | hello thunder chen -------------------------------------------------------------------------------- /19_NodeApi/01_fs/thunder/chen.txt: -------------------------------------------------------------------------------- 1 | thunder chen -------------------------------------------------------------------------------- /19_NodeApi/01_fs/thunder/clear/love.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/19_NodeApi/01_fs/thunder/clear/love.js -------------------------------------------------------------------------------- /19_NodeApi/01_fs/thunder/clear/love.txt: -------------------------------------------------------------------------------- 1 | clear love -------------------------------------------------------------------------------- /19_NodeApi/02_events/01_events模块基本使用.js: -------------------------------------------------------------------------------- 1 | const EventMitter = require('events'); 2 | 3 | //创建eventEmitter实例 4 | 5 | const emitter = new EventMitter(); 6 | emitter.on('thunder', () => { 7 | console.log('监听thunder事件'); 8 | }); 9 | 10 | setTimeout(() => { 11 | emitter.emit('thunder'); 12 | }, 2000); 13 | -------------------------------------------------------------------------------- /19_NodeApi/03_buffer/02_buffer其他创建方式.js: -------------------------------------------------------------------------------- 1 | const fs = require("fs") 2 | 3 | //创建一个buffer 4 | // 8个字节大小的buffer内存空间 5 | const buf = Buffer.alloc(8) 6 | // 7 | // console.log(buf); 8 | 9 | buf[0] = 100 10 | buf[1] = 0x66 11 | console.log(buf); 12 | console.log(buf.toString()); 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /19_NodeApi/03_buffer/buffer.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/19_NodeApi/03_buffer/buffer.jpg -------------------------------------------------------------------------------- /19_NodeApi/03_buffer/bufferfrom.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/19_NodeApi/03_buffer/bufferfrom.jpg -------------------------------------------------------------------------------- /19_NodeApi/03_buffer/fromStringFast.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/19_NodeApi/03_buffer/fromStringFast.jpg -------------------------------------------------------------------------------- /19_NodeApi/03_buffer/fromstring.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/19_NodeApi/03_buffer/fromstring.jpg -------------------------------------------------------------------------------- /19_NodeApi/03_buffer/fsf02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/19_NodeApi/03_buffer/fsf02.jpg -------------------------------------------------------------------------------- /19_NodeApi/03_buffer/test.txt: -------------------------------------------------------------------------------- 1 | 你好啊 thunderchen -------------------------------------------------------------------------------- /19_NodeApi/04_stream/foo.txt: -------------------------------------------------------------------------------- 1 | hahhah -------------------------------------------------------------------------------- /19_NodeApi/04_stream/foo_copy.txt: -------------------------------------------------------------------------------- 1 | hahhah -------------------------------------------------------------------------------- /19_NodeApi/04_stream/foo_copy02.txt: -------------------------------------------------------------------------------- 1 | hahhah -------------------------------------------------------------------------------- /19_NodeApi/04_stream/foo_copy03.txt: -------------------------------------------------------------------------------- 1 | hahhah -------------------------------------------------------------------------------- /19_NodeApi/04_stream/test.txt: -------------------------------------------------------------------------------- 1 | thunder chenhello world hello world hello world thunderchenthunderchenthunderchen thunderchen thunderchen thunderchen thunderchen 哈哈哈 thunderchen thunderchen 哈哈哈 -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-core/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "trailingComma": "all", 4 | "endOfLine": "auto" 5 | } -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-core/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:16-alpine3.15 2 | 3 | RUN mkdir -p /home/app/ 4 | 5 | WORKDIR /home/app/ 6 | 7 | COPY package*.json ./ 8 | 9 | RUN npm install 10 | 11 | COPY . . 12 | 13 | EXPOSE 3000 14 | 15 | ENTRYPOINT ["npm", "run"] 16 | 17 | CMD ["start"] 18 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-core/ecosystem.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | apps: [{ 3 | name: "gateway", 4 | script: "dist/src/main.js", 5 | env_production: { 6 | RUNNING_ENV: "prod" 7 | }, 8 | env_development: { 9 | RUNNING_ENV: "dev" 10 | } 11 | }] 12 | } 13 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-core/nest-cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/nest-cli", 3 | "collection": "@nestjs/schematics", 4 | "sourceRoot": "src" 5 | } 6 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-core/src/auth/auth.dto.ts: -------------------------------------------------------------------------------- 1 | import { ApiProperty } from '@nestjs/swagger'; 2 | 3 | export class GitlabToken { 4 | access_token: string; 5 | } 6 | 7 | export class GetTokenByApplications { 8 | @ApiProperty({ example: 'iPzSxfuXv81JAU7EXr3bog' }) 9 | code: string; 10 | } 11 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-core/src/auth/guards/feishu-auth.guard.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@nestjs/common'; 2 | import { AuthGuard } from '@nestjs/passport'; 3 | 4 | @Injectable() 5 | export class FeishuAuthGuard extends AuthGuard('feishu') { } 6 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-core/src/common/constants.ts: -------------------------------------------------------------------------------- 1 | import { SetMetadata } from '@nestjs/common'; 2 | 3 | export const IS_STREAM_KEY = 'isStream'; 4 | 5 | export const IsStream = () => SetMetadata(IS_STREAM_KEY, true); 6 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-core/src/common/logger/catchError.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: Cookie 3 | * @Description: 开发异常捕获 4 | */ 5 | 6 | export const catchError = () => { 7 | process.on('unhandledRejection', (reason, p) => { 8 | console.log('Promise: ', p, 'Reason: ', reason) 9 | }) 10 | } 11 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-core/src/core/files_mock.json: -------------------------------------------------------------------------------- 1 | { 2 | "1": "devops", 3 | "2": "jenkins", 4 | "3": "nginx" 5 | } -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-core/src/core/websites_mock.json: -------------------------------------------------------------------------------- 1 | { 2 | "www.cookieboty.com": { 3 | "/devops": { 4 | "lastModified": 1, 5 | "pageId": 1 6 | }, 7 | "/jenkins": { 8 | "lastModified": 1, 9 | "pageId": 2 10 | }, 11 | "/nginx": { 12 | "lastModified": 1, 13 | "pageId": 3 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-core/src/helper/constants.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: Cookie 3 | * @Description: 4 | */ 5 | 6 | export const MAX_PAGE_SIZE = 100; 7 | 8 | export const defaultPaginationParams: PaginationParams = { 9 | currentPage: 1, 10 | pageSize: 10, 11 | }; -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-core/src/helper/feishu/const.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: Cookie 3 | * @Description: 4 | */ 5 | 6 | 7 | import { getConfig } from "@/utils"; 8 | 9 | const { FEISHU_CONFIG } = getConfig() 10 | 11 | export const APP_ID = FEISHU_CONFIG.FEISHU_APP_ID 12 | export const APP_SECRET = FEISHU_CONFIG.FEISHU_APP_SECRET 13 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-core/src/materials/project/project.providers.ts: -------------------------------------------------------------------------------- 1 | import { Project } from './project.mongo.entity'; 2 | 3 | export const projectProviders = [ 4 | { 5 | provide: 'PROJECT_REPOSITORY', 6 | useFactory: async (AppDataSource) => await AppDataSource.getRepository(Project), 7 | inject: ['MONGODB_DATA_SOURCE'], 8 | }, 9 | ]; 10 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-core/src/materials/task/task.providers.ts: -------------------------------------------------------------------------------- 1 | import { Task } from './task.mongo.entity'; 2 | 3 | export const TaskProviders = [ 4 | { 5 | provide: 'TASK_REPOSITORY', 6 | useFactory: async (AppDataSource) => await AppDataSource.getRepository(Task), 7 | inject: ['MONGODB_DATA_SOURCE'], 8 | }, 9 | ]; 10 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-core/src/userCenter/resource/resource.providers.ts: -------------------------------------------------------------------------------- 1 | import { Resource } from './resource.mysql.entity'; 2 | 3 | export const ResourceProviders = [ 4 | { 5 | provide: 'RESOURCE_REPOSITORY', 6 | useFactory: (AppDataSource) => AppDataSource.getRepository(Resource), 7 | inject: ['MYSQL_DATA_SOURCE'], 8 | }, 9 | ]; 10 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-core/src/userCenter/role/role.providers.ts: -------------------------------------------------------------------------------- 1 | import { Role } from './role.mysql.entity'; 2 | 3 | export const RoleProviders = [ 4 | { 5 | provide: 'ROLE_REPOSITORY', 6 | useFactory: (AppDataSource) => AppDataSource.getRepository(Role), 7 | inject: ['MYSQL_DATA_SOURCE'], 8 | }, 9 | ]; 10 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-core/src/userCenter/system/system.providers.ts: -------------------------------------------------------------------------------- 1 | import { System } from './system.mysql.entity'; 2 | 3 | export const systemProviders = [ 4 | { 5 | provide: 'SYSTEM_REPOSITORY', 6 | useFactory: (AppDataSource) => AppDataSource.getRepository(System), 7 | inject: ['MYSQL_DATA_SOURCE'], 8 | }, 9 | ]; 10 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-core/src/userCenter/user-role/user-role.providers.ts: -------------------------------------------------------------------------------- 1 | import { UserRole } from './user-role.mysql.entity'; 2 | 3 | export const UserRoleProviders = [ 4 | { 5 | provide: 'USER_ROLE_REPOSITORY', 6 | useFactory: (AppDataSource) => AppDataSource.getRepository(UserRole), 7 | inject: ['MYSQL_DATA_SOURCE'], 8 | }, 9 | ]; 10 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-core/src/userCenter/user/user.providers.ts: -------------------------------------------------------------------------------- 1 | import { User } from './user.mysql.entity'; 2 | 3 | export const UserProviders = [ 4 | { 5 | provide: 'USER_REPOSITORY', 6 | useFactory: (AppDataSource) => AppDataSource.getRepository(User), 7 | inject: ['MYSQL_DATA_SOURCE'], 8 | }, 9 | ]; 10 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-core/start_dev_service.sh: -------------------------------------------------------------------------------- 1 | docker-compose -f docker-compose.gateway-service-dev.yml up -d --build 2 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-core/test/jest-e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "moduleFileExtensions": ["js", "json", "ts"], 3 | "rootDir": ".", 4 | "testEnvironment": "node", 5 | "testRegex": ".e2e-spec.ts$", 6 | "transform": { 7 | "^.+\\.(t|j)s$": "ts-jest" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-core/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "exclude": ["node_modules", "test", "dist", "**/*spec.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-material/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "trailingComma": "all", 4 | "endOfLine": "auto" 5 | } -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-material/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:16-alpine3.15 2 | 3 | RUN mkdir -p /home/app/ 4 | 5 | WORKDIR /home/app/ 6 | 7 | COPY package*.json ./ 8 | 9 | RUN npm install 10 | 11 | COPY . . 12 | 13 | EXPOSE 3000 14 | 15 | ENTRYPOINT ["npm", "run"] 16 | 17 | CMD ["start"] 18 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-material/ecosystem.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | apps: [{ 3 | name: "gateway", 4 | script: "dist/src/main.js", 5 | env_production: { 6 | RUNNING_ENV: "prod" 7 | }, 8 | env_development: { 9 | RUNNING_ENV: "dev" 10 | } 11 | }] 12 | } 13 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-material/nest-cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/nest-cli", 3 | "collection": "@nestjs/schematics", 4 | "sourceRoot": "src" 5 | } 6 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-material/src/auth/auth.dto.ts: -------------------------------------------------------------------------------- 1 | import { ApiProperty } from '@nestjs/swagger'; 2 | 3 | export class GitlabToken { 4 | access_token: string; 5 | } 6 | 7 | export class GetTokenByApplications { 8 | @ApiProperty({ example: 'iPzSxfuXv81JAU7EXr3bog' }) 9 | code: string; 10 | } 11 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-material/src/auth/guards/feishu-auth.guard.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@nestjs/common'; 2 | import { AuthGuard } from '@nestjs/passport'; 3 | 4 | @Injectable() 5 | export class FeishuAuthGuard extends AuthGuard('feishu') { } 6 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-material/src/common/constants.ts: -------------------------------------------------------------------------------- 1 | import { SetMetadata } from '@nestjs/common'; 2 | 3 | export const IS_STREAM_KEY = 'isStream'; 4 | 5 | export const IsStream = () => SetMetadata(IS_STREAM_KEY, true); 6 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-material/src/common/logger/catchError.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: Cookie 3 | * @Description: 开发异常捕获 4 | */ 5 | 6 | export const catchError = () => { 7 | process.on('unhandledRejection', (reason, p) => { 8 | console.log('Promise: ', p, 'Reason: ', reason) 9 | }) 10 | } 11 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-material/src/helper/constants.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: Cookie 3 | * @Description: 4 | */ 5 | 6 | export const MAX_PAGE_SIZE = 100; 7 | 8 | export const defaultPaginationParams: PaginationParams = { 9 | currentPage: 1, 10 | pageSize: 10, 11 | }; -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-material/src/helper/feishu/const.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: Cookie 3 | * @Description: 4 | */ 5 | 6 | 7 | import { getConfig } from "@/utils"; 8 | 9 | const { FEISHU_CONFIG } = getConfig() 10 | 11 | export const APP_ID = FEISHU_CONFIG.FEISHU_APP_ID 12 | export const APP_SECRET = FEISHU_CONFIG.FEISHU_APP_SECRET 13 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-material/src/materials/task/task.providers.ts: -------------------------------------------------------------------------------- 1 | import { Task } from './task.mongo.entity'; 2 | 3 | export const TaskProviders = [ 4 | { 5 | provide: 'TASK_REPOSITORY', 6 | useFactory: async (AppDataSource) => await AppDataSource.getRepository(Task), 7 | inject: ['MONGODB_DATA_SOURCE'], 8 | }, 9 | ]; 10 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-material/src/userCenter/resource/resource.providers.ts: -------------------------------------------------------------------------------- 1 | import { Resource } from './resource.mysql.entity'; 2 | 3 | export const ResourceProviders = [ 4 | { 5 | provide: 'RESOURCE_REPOSITORY', 6 | useFactory: (AppDataSource) => AppDataSource.getRepository(Resource), 7 | inject: ['MYSQL_DATA_SOURCE'], 8 | }, 9 | ]; 10 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-material/src/userCenter/role/role.providers.ts: -------------------------------------------------------------------------------- 1 | import { Role } from './role.mysql.entity'; 2 | 3 | export const RoleProviders = [ 4 | { 5 | provide: 'ROLE_REPOSITORY', 6 | useFactory: (AppDataSource) => AppDataSource.getRepository(Role), 7 | inject: ['MYSQL_DATA_SOURCE'], 8 | }, 9 | ]; 10 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-material/src/userCenter/system/system.providers.ts: -------------------------------------------------------------------------------- 1 | import { System } from './system.mysql.entity'; 2 | 3 | export const systemProviders = [ 4 | { 5 | provide: 'SYSTEM_REPOSITORY', 6 | useFactory: (AppDataSource) => AppDataSource.getRepository(System), 7 | inject: ['MYSQL_DATA_SOURCE'], 8 | }, 9 | ]; 10 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-material/src/userCenter/user/user.providers.ts: -------------------------------------------------------------------------------- 1 | import { User } from './user.mysql.entity'; 2 | 3 | export const UserProviders = [ 4 | { 5 | provide: 'USER_REPOSITORY', 6 | useFactory: (AppDataSource) => AppDataSource.getRepository(User), 7 | inject: ['MYSQL_DATA_SOURCE'], 8 | }, 9 | ]; 10 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-material/start_dev_service.sh: -------------------------------------------------------------------------------- 1 | docker-compose -f docker-compose.gateway-service-dev.yml up -d --build 2 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-material/test/jest-e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "moduleFileExtensions": ["js", "json", "ts"], 3 | "rootDir": ".", 4 | "testEnvironment": "node", 5 | "testRegex": ".e2e-spec.ts$", 6 | "transform": { 7 | "^.+\\.(t|j)s$": "ts-jest" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-material/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "exclude": ["node_modules", "test", "dist", "**/*spec.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-user/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "trailingComma": "all", 4 | "endOfLine": "auto" 5 | } -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-user/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:16-alpine3.15 2 | 3 | RUN mkdir -p /home/app/ 4 | 5 | WORKDIR /home/app/ 6 | 7 | COPY package*.json ./ 8 | 9 | RUN npm install 10 | 11 | COPY . . 12 | 13 | EXPOSE 3000 14 | 15 | ENTRYPOINT ["npm", "run"] 16 | 17 | CMD ["start"] 18 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-user/ecosystem.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | apps: [{ 3 | name: "gateway", 4 | script: "dist/src/main.js", 5 | env_production: { 6 | RUNNING_ENV: "prod" 7 | }, 8 | env_development: { 9 | RUNNING_ENV: "dev" 10 | } 11 | }] 12 | } 13 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-user/nest-cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/nest-cli", 3 | "collection": "@nestjs/schematics", 4 | "sourceRoot": "src" 5 | } 6 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-user/src/auth/auth.dto.ts: -------------------------------------------------------------------------------- 1 | import { ApiProperty } from '@nestjs/swagger'; 2 | 3 | export class GitlabToken { 4 | access_token: string; 5 | } 6 | 7 | export class GetTokenByApplications { 8 | @ApiProperty({ example: 'iPzSxfuXv81JAU7EXr3bog' }) 9 | code: string; 10 | } 11 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-user/src/auth/guards/feishu-auth.guard.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@nestjs/common'; 2 | import { AuthGuard } from '@nestjs/passport'; 3 | 4 | @Injectable() 5 | export class FeishuAuthGuard extends AuthGuard('feishu') { } 6 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-user/src/common/constants.ts: -------------------------------------------------------------------------------- 1 | import { SetMetadata } from '@nestjs/common'; 2 | 3 | export const IS_STREAM_KEY = 'isStream'; 4 | 5 | export const IsStream = () => SetMetadata(IS_STREAM_KEY, true); 6 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-user/src/common/logger/catchError.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: Cookie 3 | * @Description: 开发异常捕获 4 | */ 5 | 6 | export const catchError = () => { 7 | process.on('unhandledRejection', (reason, p) => { 8 | console.log('Promise: ', p, 'Reason: ', reason) 9 | }) 10 | } 11 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-user/src/helper/constants.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: Cookie 3 | * @Description: 4 | */ 5 | 6 | export const MAX_PAGE_SIZE = 100; 7 | 8 | export const defaultPaginationParams: PaginationParams = { 9 | currentPage: 1, 10 | pageSize: 10, 11 | }; -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-user/src/helper/feishu/const.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: Cookie 3 | * @Description: 4 | */ 5 | 6 | 7 | import { getConfig } from "@/utils"; 8 | 9 | const { FEISHU_CONFIG } = getConfig() 10 | 11 | export const APP_ID = FEISHU_CONFIG.FEISHU_APP_ID 12 | export const APP_SECRET = FEISHU_CONFIG.FEISHU_APP_SECRET 13 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-user/src/materials/page/page-config/dto/update-page-config.dto.ts: -------------------------------------------------------------------------------- 1 | import { PartialType } from '@nestjs/swagger'; 2 | import { CreatePageConfigDto } from './create-page-config.dto'; 3 | 4 | export class UpdatePageConfigDto extends PartialType(CreatePageConfigDto) {} 5 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-user/src/userCenter/resource/resource.providers.ts: -------------------------------------------------------------------------------- 1 | import { Resource } from './resource.mysql.entity'; 2 | 3 | export const ResourceProviders = [ 4 | { 5 | provide: 'RESOURCE_REPOSITORY', 6 | useFactory: (AppDataSource) => AppDataSource.getRepository(Resource), 7 | inject: ['MYSQL_DATA_SOURCE'], 8 | }, 9 | ]; 10 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-user/src/userCenter/role/role.providers.ts: -------------------------------------------------------------------------------- 1 | import { Role } from './role.mysql.entity'; 2 | 3 | export const RoleProviders = [ 4 | { 5 | provide: 'ROLE_REPOSITORY', 6 | useFactory: (AppDataSource) => AppDataSource.getRepository(Role), 7 | inject: ['MYSQL_DATA_SOURCE'], 8 | }, 9 | ]; 10 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-user/src/userCenter/system/system.providers.ts: -------------------------------------------------------------------------------- 1 | import { System } from './system.mysql.entity'; 2 | 3 | export const systemProviders = [ 4 | { 5 | provide: 'SYSTEM_REPOSITORY', 6 | useFactory: (AppDataSource) => AppDataSource.getRepository(System), 7 | inject: ['MYSQL_DATA_SOURCE'], 8 | }, 9 | ]; 10 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-user/src/userCenter/user-role/user-role.providers.ts: -------------------------------------------------------------------------------- 1 | import { UserRole } from './user-role.mysql.entity'; 2 | 3 | export const UserRoleProviders = [ 4 | { 5 | provide: 'USER_ROLE_REPOSITORY', 6 | useFactory: (AppDataSource) => AppDataSource.getRepository(UserRole), 7 | inject: ['MYSQL_DATA_SOURCE'], 8 | }, 9 | ]; 10 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-user/src/userCenter/user/user.providers.ts: -------------------------------------------------------------------------------- 1 | import { User } from './user.mysql.entity'; 2 | 3 | export const UserProviders = [ 4 | { 5 | provide: 'USER_REPOSITORY', 6 | useFactory: (AppDataSource) => AppDataSource.getRepository(User), 7 | inject: ['MYSQL_DATA_SOURCE'], 8 | }, 9 | ]; 10 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-user/start_dev_service.sh: -------------------------------------------------------------------------------- 1 | docker-compose -f docker-compose.gateway-service-dev.yml up -d --build 2 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-user/test/jest-e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "moduleFileExtensions": ["js", "json", "ts"], 3 | "rootDir": ".", 4 | "testEnvironment": "node", 5 | "testRegex": ".e2e-spec.ts$", 6 | "transform": { 7 | "^.+\\.(t|j)s$": "ts-jest" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-feat-user/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "exclude": ["node_modules", "test", "dist", "**/*spec.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-main/.npmrc: -------------------------------------------------------------------------------- 1 | public-hoist-pattern[]=*react* 2 | public-hoist-pattern[]=*eslint* 3 | public-hoist-pattern[]=*babel* -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-main/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "trailingComma": "all", 4 | "endOfLine": "auto" 5 | } -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-main/apps/fast-gateway/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "fast-gateway", 3 | "version": "0.0.1", 4 | "description": "", 5 | "author": "", 6 | "private": true, 7 | "license": "UNLICENSED", 8 | "scripts": { 9 | "dev": "cd .. && pnpm start:gateway" 10 | } 11 | } -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-main/apps/fast-gateway/src/core/files_mock.json: -------------------------------------------------------------------------------- 1 | { 2 | "1": "devops", 3 | "2": "jenkins", 4 | "3": "nginx" 5 | } -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-main/apps/fast-gateway/src/core/websites_mock.json: -------------------------------------------------------------------------------- 1 | { 2 | "127.0.0.1": { 3 | "/devops": { 4 | "lastModified": 1, 5 | "pageId": 1 6 | }, 7 | "/jenkins": { 8 | "lastModified": 1, 9 | "pageId": 2 10 | }, 11 | "/nginx": { 12 | "lastModified": 1, 13 | "pageId": 3 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-main/apps/fast-gateway/test/jest-e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "moduleFileExtensions": ["js", "json", "ts"], 3 | "rootDir": ".", 4 | "testEnvironment": "node", 5 | "testRegex": ".e2e-spec.ts$", 6 | "transform": { 7 | "^.+\\.(t|j)s$": "ts-jest" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-main/apps/materials/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "materials", 3 | "version": "0.0.1", 4 | "description": "", 5 | "author": "", 6 | "private": true, 7 | "license": "UNLICENSED", 8 | "scripts": { 9 | "dev": "cd .. && pnpm start:materials" 10 | } 11 | } -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-main/apps/materials/src/materials/task/task.providers.ts: -------------------------------------------------------------------------------- 1 | import { Task } from './task.mongo.entity'; 2 | 3 | export const TaskProviders = [ 4 | { 5 | provide: 'TASK_REPOSITORY', 6 | useFactory: async (AppDataSource) => await AppDataSource.getRepository(Task), 7 | inject: ['MONGODB_DATA_SOURCE'], 8 | }, 9 | ]; 10 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-main/apps/materials/test/jest-e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "moduleFileExtensions": ["js", "json", "ts"], 3 | "rootDir": ".", 4 | "testEnvironment": "node", 5 | "testRegex": ".e2e-spec.ts$", 6 | "transform": { 7 | "^.+\\.(t|j)s$": "ts-jest" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-main/apps/user-center/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "user-center", 3 | "version": "0.0.1", 4 | "description": "", 5 | "author": "", 6 | "private": true, 7 | "license": "UNLICENSED", 8 | "scripts": { 9 | "dev": "cd .. && pnpm start:user" 10 | } 11 | } -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-main/apps/user-center/src/auth/auth.dto.ts: -------------------------------------------------------------------------------- 1 | import { ApiProperty } from '@nestjs/swagger'; 2 | 3 | export class GitlabToken { 4 | access_token: string; 5 | } 6 | 7 | export class GetTokenByApplications { 8 | @ApiProperty({ example: 'iPzSxfuXv81JAU7EXr3bog' }) 9 | code: string; 10 | } 11 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-main/apps/user-center/src/auth/guards/feishu-auth.guard.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@nestjs/common'; 2 | import { AuthGuard } from '@nestjs/passport'; 3 | 4 | @Injectable() 5 | export class FeishuAuthGuard extends AuthGuard('feishu') { } 6 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-main/apps/user-center/src/userCenter/role/role.providers.ts: -------------------------------------------------------------------------------- 1 | import { Role } from './role.mysql.entity'; 2 | 3 | export const RoleProviders = [ 4 | { 5 | provide: 'ROLE_REPOSITORY', 6 | useFactory: (AppDataSource) => AppDataSource.getRepository(Role), 7 | inject: ['MYSQL_DATA_SOURCE'], 8 | }, 9 | ]; 10 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-main/apps/user-center/src/userCenter/system/system.providers.ts: -------------------------------------------------------------------------------- 1 | import { System } from './system.mysql.entity'; 2 | 3 | export const systemProviders = [ 4 | { 5 | provide: 'SYSTEM_REPOSITORY', 6 | useFactory: (AppDataSource) => AppDataSource.getRepository(System), 7 | inject: ['MYSQL_DATA_SOURCE'], 8 | }, 9 | ]; 10 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-main/apps/user-center/src/userCenter/user/user.providers.ts: -------------------------------------------------------------------------------- 1 | import { User } from './user.mysql.entity'; 2 | 3 | export const UserProviders = [ 4 | { 5 | provide: 'USER_REPOSITORY', 6 | useFactory: (AppDataSource) => AppDataSource.getRepository(User), 7 | inject: ['MYSQL_DATA_SOURCE'], 8 | }, 9 | ]; 10 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-main/apps/user-center/test/jest-e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "moduleFileExtensions": ["js", "json", "ts"], 3 | "rootDir": ".", 4 | "testEnvironment": "node", 5 | "testRegex": ".e2e-spec.ts$", 6 | "transform": { 7 | "^.+\\.(t|j)s$": "ts-jest" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-main/build/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:16-alpine3.15 2 | 3 | RUN mkdir -p /home/app/ 4 | 5 | WORKDIR /home/app/ 6 | 7 | COPY package*.json ./ 8 | 9 | RUN npm install 10 | 11 | COPY . . 12 | 13 | EXPOSE 3000 14 | 15 | ENTRYPOINT ["npm", "run"] 16 | 17 | CMD ["start"] 18 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-main/build/start.ts: -------------------------------------------------------------------------------- 1 | const child_process = require("child_process"); 2 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-main/build/start_dev_service.sh: -------------------------------------------------------------------------------- 1 | docker-compose -f docker-compose.gateway-service-dev.yml up -d --build 2 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-main/clients/materials/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "@babel/preset-env", 4 | "@babel/preset-react", 5 | [ 6 | "@babel/preset-typescript", 7 | { 8 | "isTSX": true, 9 | "allExtensions": true 10 | } 11 | ] 12 | ] 13 | } -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-main/clients/materials/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-main/clients/materials/cli.config.js: -------------------------------------------------------------------------------- 1 | const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin'); 2 | 3 | module.exports = { 4 | entry: { 5 | app: './src/index.tsx', 6 | }, 7 | template: 'tpl/index.html', 8 | devServer: {}, 9 | plugins: [ 10 | ], 11 | }; 12 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-main/clients/materials/cli.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "entry": { 3 | "app": "./src/index.tsx" 4 | }, 5 | "output": { 6 | "filename": "build.[contenthash].js", 7 | "path": "./dist" 8 | }, 9 | "template": "tpl/index.html" 10 | } -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-main/clients/materials/src/App.tsx: -------------------------------------------------------------------------------- 1 | import React, { Component } from "react"; 2 | 3 | class App extends Component { 4 | render() { 5 | return ( 6 |
7 |

我是物料系统

8 |
9 | ); 10 | } 11 | } 12 | 13 | export default App; 14 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-main/clients/materials/src/base.less: -------------------------------------------------------------------------------- 1 | .title { 2 | color: red; 3 | } -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-main/clients/materials/temp_cache/default-development/index.pack.old: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/20_Nest_v2/gateway/fast-gateway-main/clients/materials/temp_cache/default-development/index.pack.old -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-main/clients/materials/tpl/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-main/ecosystem.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | apps: [{ 3 | name: "gateway", 4 | script: "dist/src/main.js", 5 | env_production: { 6 | RUNNING_ENV: "prod" 7 | }, 8 | env_development: { 9 | RUNNING_ENV: "dev" 10 | } 11 | }] 12 | } 13 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-main/libs/common/src/helper/constants.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: Cookie 3 | * @Description: 4 | */ 5 | 6 | export const MAX_PAGE_SIZE = 100; 7 | 8 | export const defaultPaginationParams: PaginationParams = { 9 | currentPage: 1, 10 | pageSize: 10, 11 | }; -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-main/libs/common/src/helper/feishu/const.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: Cookie 3 | * @Description: 4 | */ 5 | 6 | 7 | import { getConfig } from "../../utils"; 8 | 9 | const { FEISHU_CONFIG } = getConfig() 10 | 11 | export const APP_ID = FEISHU_CONFIG.FEISHU_APP_ID 12 | export const APP_SECRET = FEISHU_CONFIG.FEISHU_APP_SECRET 13 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-main/libs/common/src/logger/catchError.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: Cookie 3 | * @Description: 开发异常捕获 4 | */ 5 | 6 | export const catchError = () => { 7 | process.on('unhandledRejection', (reason, p) => { 8 | console.log('Promise: ', p, 'Reason: ', reason) 9 | }) 10 | } 11 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-main/pnpm-workspace.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | - "clients/*" 3 | - "apps/*" 4 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-main/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "exclude": ["node_modules", "test", "dist", "**/*spec.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /20_Nest_v2/gateway/fast-gateway-main/turbo.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://turborepo.org/schema.json", 3 | "pipeline": { 4 | "dev": { 5 | "cache": false 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /20_Nest_v2/jy_nest_gateway/.config/.prod.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/20_Nest_v2/jy_nest_gateway/.config/.prod.yaml -------------------------------------------------------------------------------- /20_Nest_v2/jy_nest_gateway/.config/.test.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/20_Nest_v2/jy_nest_gateway/.config/.test.yaml -------------------------------------------------------------------------------- /20_Nest_v2/jy_nest_gateway/.env: -------------------------------------------------------------------------------- 1 | DATABASE_USER=test 2 | DATABASE_PASSWORD=test 3 | -------------------------------------------------------------------------------- /20_Nest_v2/jy_nest_gateway/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "trailingComma": "all" 4 | } -------------------------------------------------------------------------------- /20_Nest_v2/jy_nest_gateway/helper/index.ts: -------------------------------------------------------------------------------- 1 | import { createParamDecorator, ExecutionContext } from '@nestjs/common'; 2 | 3 | export const PayloadUser = createParamDecorator( 4 | (data, ctx: ExecutionContext): Payload => { 5 | const request = ctx.switchToHttp().getRequest(); 6 | return request.user; 7 | }, 8 | ); 9 | -------------------------------------------------------------------------------- /20_Nest_v2/jy_nest_gateway/nest-cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/nest-cli", 3 | "collection": "@nestjs/schematics", 4 | "sourceRoot": "src", 5 | "compilerOptions": { 6 | "deleteOutDir": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /20_Nest_v2/jy_nest_gateway/src/app.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@nestjs/common'; 2 | 3 | @Injectable() 4 | export class AppService { 5 | getHello(): string { 6 | return 'Hello World!'; 7 | } 8 | findAll(): string { 9 | return 'Hello World!'; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /20_Nest_v2/jy_nest_gateway/src/auth/dto/create-auth.dto.ts: -------------------------------------------------------------------------------- 1 | export class CreateAuthDto {} 2 | -------------------------------------------------------------------------------- /20_Nest_v2/jy_nest_gateway/src/auth/dto/update-auth.dto.ts: -------------------------------------------------------------------------------- 1 | import { PartialType } from '@nestjs/swagger'; 2 | import { CreateAuthDto } from './create-auth.dto'; 3 | 4 | export class UpdateAuthDto extends PartialType(CreateAuthDto) {} 5 | -------------------------------------------------------------------------------- /20_Nest_v2/jy_nest_gateway/src/auth/entities/auth.entity.ts: -------------------------------------------------------------------------------- 1 | export class Auth {} 2 | -------------------------------------------------------------------------------- /20_Nest_v2/jy_nest_gateway/src/auth/guards/fs.auth.guard.ts: -------------------------------------------------------------------------------- 1 | // feishu-auth.guard.ts 2 | import { Injectable } from '@nestjs/common'; 3 | import { AuthGuard } from '@nestjs/passport'; 4 | 5 | @Injectable() 6 | export class FeishuAuthGuard extends AuthGuard('feishu') {} 7 | -------------------------------------------------------------------------------- /20_Nest_v2/jy_nest_gateway/src/common/README.md: -------------------------------------------------------------------------------- 1 | * **transform.interceptor**:全局返回参数 2 | * **exception.filter**: 全局异常拦截 3 | * **database**: 数据库 4 | -------------------------------------------------------------------------------- /20_Nest_v2/jy_nest_gateway/src/common/exceptions/business.error.codes.ts: -------------------------------------------------------------------------------- 1 | export const BUSINESS_ERROR_CODE = { 2 | // 公共错误码 3 | COMMON: 10001, 4 | // 特殊错误码 5 | TOKEN_INVALID: 10002, 6 | // 禁止访问 7 | ACCESS_FORBIDDEN: 10003, 8 | // 权限已禁用 9 | PERMISSION_DISABLED: 10003, 10 | // 用户已冻结 11 | USER_DISABLED: 10004, 12 | }; 13 | -------------------------------------------------------------------------------- /20_Nest_v2/jy_nest_gateway/src/common/logger/catchError.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: Cookie 3 | * @Description: 开发异常捕获 4 | */ 5 | 6 | export const catchError = () => { 7 | process.on('unhandledRejection', (reason, p) => { 8 | console.log('Promise: ', p, 'Reason: ', reason); 9 | }); 10 | }; 11 | -------------------------------------------------------------------------------- /20_Nest_v2/jy_nest_gateway/src/user/dto/update-user.dto.ts: -------------------------------------------------------------------------------- 1 | import { PartialType } from '@nestjs/mapped-types'; 2 | import { AddUserDto } from './create-user.dto'; 3 | 4 | export class UpdateUserDto extends PartialType(AddUserDto) {} 5 | -------------------------------------------------------------------------------- /20_Nest_v2/jy_nest_gateway/src/user/entities/user.mongo.entity.ts: -------------------------------------------------------------------------------- 1 | import { Column, ObjectIdColumn } from 'typeorm'; 2 | 3 | //创建mongodb 实体 4 | export class User { 5 | //自增主键 6 | @ObjectIdColumn() 7 | id?: number; 8 | 9 | @Column({ default: null }) 10 | name: string; 11 | } 12 | -------------------------------------------------------------------------------- /20_Nest_v2/jy_nest_gateway/src/user/user.providers.ts: -------------------------------------------------------------------------------- 1 | import { User } from './entities/user.mongo.entity'; 2 | 3 | export const UserProviders = [ 4 | { 5 | provide: 'USER_REPOSITORY', 6 | useFactory: async (AppDataSource) => 7 | await AppDataSource.getRepository(User), 8 | inject: ['MONGODB_DATA_SOURCE'], 9 | }, 10 | ]; 11 | -------------------------------------------------------------------------------- /20_Nest_v2/jy_nest_gateway/test/jest-e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "moduleFileExtensions": ["js", "json", "ts"], 3 | "rootDir": ".", 4 | "testEnvironment": "node", 5 | "testRegex": ".e2e-spec.ts$", 6 | "transform": { 7 | "^.+\\.(t|j)s$": "ts-jest" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /20_Nest_v2/jy_nest_gateway/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "exclude": ["node_modules", "test", "dist", "**/*spec.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /20_Nest_v2/jy_nest_gateway/types/globle.d.ts: -------------------------------------------------------------------------------- 1 | declare type Payload = { 2 | status?: number; 3 | userId: number; 4 | username: string; 5 | name: string; 6 | email: string; 7 | feishuAccessToken: string; 8 | feishuUserId: string; 9 | department?: string; 10 | departmentId?: string; 11 | }; 12 | -------------------------------------------------------------------------------- /20_Nest_v2/物料分类.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/20_Nest_v2/物料分类.webp -------------------------------------------------------------------------------- /20_Nest_v2/用户权限设计.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/20_Nest_v2/用户权限设计.webp -------------------------------------------------------------------------------- /21_Nest_v3/Docker/.dockerignore: -------------------------------------------------------------------------------- 1 | # 注释 2 | *.md 3 | !README.md 4 | node_modules/ 5 | [a-c].txt 6 | .git/ 7 | .DS_Store 8 | .vscode/ 9 | .dockerignore 10 | .eslintignore 11 | .eslintrc 12 | .prettierrc 13 | .prettierignore -------------------------------------------------------------------------------- /21_Nest_v3/Docker/2.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:latest 2 | 3 | WORKDIR /app 4 | 5 | COPY . . 6 | 7 | RUN npm config set registry https://registry.npmmirror.com/ 8 | 9 | RUN npm install -g http-server 10 | 11 | EXPOSE 8080 12 | 13 | VOLUME /app 14 | 15 | CMD [ "http-server","-p","8080" ] -------------------------------------------------------------------------------- /21_Nest_v3/Docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:latest 2 | 3 | WORKDIR /app 4 | 5 | COPY . . 6 | 7 | RUN npm config set registry https://registry.npmmirror.com/ 8 | 9 | RUN npm install -g http-server 10 | 11 | EXPOSE 8080 12 | 13 | CMD [ "http-server","-p","8080" ] -------------------------------------------------------------------------------- /21_Nest_v3/Docker/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Document 7 | 8 | 9 | hello docker 10 | 11 | -------------------------------------------------------------------------------- /21_Nest_v3/DockerNext/ARG.dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:18-alpine3.14 2 | 3 | ARG aaa 4 | ARG bbb 5 | 6 | WORKDIR /app 7 | 8 | COPY ./ARG.js . 9 | 10 | ENV aaa=${aaa} \ 11 | bbb=${bbb} 12 | 13 | CMD [ "node","/app/ARG.js" ] -------------------------------------------------------------------------------- /21_Nest_v3/DockerNext/ARG.js: -------------------------------------------------------------------------------- 1 | console.log(process.env.aaa); 2 | console.log(process.env.bbb); -------------------------------------------------------------------------------- /21_Nest_v3/DockerNext/EntryPoint.dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:18-alpine3.14 2 | 3 | # CMD [ "echo","thunderchen","到此一游" ] 4 | ENTRYPOINT ["echo", "光光", "到此一游"] -------------------------------------------------------------------------------- /21_Nest_v3/DockerNext/aaa.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/21_Nest_v3/DockerNext/aaa.tar.gz -------------------------------------------------------------------------------- /21_Nest_v3/DockerNext/copyadd.dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:18-alpine3.14 2 | 3 | ADD ./aaa.tar.gz /aaa 4 | 5 | COPY ./aaa.tar.gz /bbb -------------------------------------------------------------------------------- /21_Nest_v3/DockerNext/copyvsadd/1111: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/21_Nest_v3/DockerNext/copyvsadd/1111 -------------------------------------------------------------------------------- /21_Nest_v3/DockerNext/copyvsadd/2222: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/21_Nest_v3/DockerNext/copyvsadd/2222 -------------------------------------------------------------------------------- /21_Nest_v3/Mysql/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mysql", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "keywords": [], 10 | "author": "", 11 | "license": "ISC", 12 | "dependencies": { 13 | "mysql2": "^3.5.2" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /21_Nest_v3/RBAC.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/21_Nest_v3/RBAC.jpg -------------------------------------------------------------------------------- /21_Nest_v3/README.md: -------------------------------------------------------------------------------- 1 | NestJS Advanced -------------------------------------------------------------------------------- /21_Nest_v3/Rxjs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "rxjs", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "type": "module", 7 | "scripts": { 8 | "test": "echo \"Error: no test specified\" && exit 1" 9 | }, 10 | "author": "", 11 | "license": "ISC", 12 | "dependencies": { 13 | "rxjs": "^7.8.1" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /21_Nest_v3/access_token_and_refresh_token/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "trailingComma": "all" 4 | } -------------------------------------------------------------------------------- /21_Nest_v3/access_token_and_refresh_token/nest-cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/nest-cli", 3 | "collection": "@nestjs/schematics", 4 | "sourceRoot": "src", 5 | "compilerOptions": { 6 | "deleteOutDir": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /21_Nest_v3/access_token_and_refresh_token/src/app.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@nestjs/common'; 2 | 3 | @Injectable() 4 | export class AppService { 5 | getHello(): string { 6 | return 'Hello World!'; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /21_Nest_v3/access_token_and_refresh_token/src/main.ts: -------------------------------------------------------------------------------- 1 | import { NestFactory } from '@nestjs/core'; 2 | import { AppModule } from './app.module'; 3 | 4 | async function bootstrap() { 5 | const app = await NestFactory.create(AppModule); 6 | app.enableCors(); 7 | await app.listen(3000); 8 | } 9 | bootstrap(); 10 | -------------------------------------------------------------------------------- /21_Nest_v3/access_token_and_refresh_token/src/user/dto/login-user.dto.ts: -------------------------------------------------------------------------------- 1 | export class LoginUserDto { 2 | username: string; 3 | password: string; 4 | } 5 | -------------------------------------------------------------------------------- /21_Nest_v3/access_token_and_refresh_token/src/user/user.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { UserService } from './user.service'; 3 | import { UserController } from './user.controller'; 4 | 5 | @Module({ 6 | controllers: [UserController], 7 | providers: [UserService] 8 | }) 9 | export class UserModule {} 10 | -------------------------------------------------------------------------------- /21_Nest_v3/access_token_and_refresh_token/test/jest-e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "moduleFileExtensions": ["js", "json", "ts"], 3 | "rootDir": ".", 4 | "testEnvironment": "node", 5 | "testRegex": ".e2e-spec.ts$", 6 | "transform": { 7 | "^.+\\.(t|j)s$": "ts-jest" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /21_Nest_v3/access_token_and_refresh_token/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "exclude": ["node_modules", "test", "dist", "**/*spec.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /21_Nest_v3/acl-test/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "trailingComma": "all" 4 | } -------------------------------------------------------------------------------- /21_Nest_v3/acl-test/nest-cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/nest-cli", 3 | "collection": "@nestjs/schematics", 4 | "sourceRoot": "src", 5 | "compilerOptions": { 6 | "deleteOutDir": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /21_Nest_v3/acl-test/src/aaa/dto/create-aaa.dto.ts: -------------------------------------------------------------------------------- 1 | export class CreateAaaDto {} 2 | -------------------------------------------------------------------------------- /21_Nest_v3/acl-test/src/aaa/dto/update-aaa.dto.ts: -------------------------------------------------------------------------------- 1 | import { PartialType } from '@nestjs/mapped-types'; 2 | import { CreateAaaDto } from './create-aaa.dto'; 3 | 4 | export class UpdateAaaDto extends PartialType(CreateAaaDto) {} 5 | -------------------------------------------------------------------------------- /21_Nest_v3/acl-test/src/aaa/entities/aaa.entity.ts: -------------------------------------------------------------------------------- 1 | export class Aaa {} 2 | -------------------------------------------------------------------------------- /21_Nest_v3/acl-test/src/app.controller.ts: -------------------------------------------------------------------------------- 1 | import { Controller, Get } from '@nestjs/common'; 2 | import { AppService } from './app.service'; 3 | 4 | @Controller() 5 | export class AppController { 6 | constructor(private readonly appService: AppService) {} 7 | 8 | @Get() 9 | getHello(): string { 10 | return this.appService.getHello(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /21_Nest_v3/acl-test/src/app.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@nestjs/common'; 2 | 3 | @Injectable() 4 | export class AppService { 5 | getHello(): string { 6 | return 'Hello World!'; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /21_Nest_v3/acl-test/src/bbb/bbb.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { BbbService } from './bbb.service'; 3 | import { BbbController } from './bbb.controller'; 4 | 5 | @Module({ 6 | controllers: [BbbController], 7 | providers: [BbbService] 8 | }) 9 | export class BbbModule {} 10 | -------------------------------------------------------------------------------- /21_Nest_v3/acl-test/src/bbb/dto/create-bbb.dto.ts: -------------------------------------------------------------------------------- 1 | export class CreateBbbDto {} 2 | -------------------------------------------------------------------------------- /21_Nest_v3/acl-test/src/bbb/dto/update-bbb.dto.ts: -------------------------------------------------------------------------------- 1 | import { PartialType } from '@nestjs/mapped-types'; 2 | import { CreateBbbDto } from './create-bbb.dto'; 3 | 4 | export class UpdateBbbDto extends PartialType(CreateBbbDto) {} 5 | -------------------------------------------------------------------------------- /21_Nest_v3/acl-test/src/bbb/entities/bbb.entity.ts: -------------------------------------------------------------------------------- 1 | export class Bbb {} 2 | -------------------------------------------------------------------------------- /21_Nest_v3/acl-test/src/common/exceptions/business.error.codes.ts: -------------------------------------------------------------------------------- 1 | export const BUSINESS_ERROR_CODE = { 2 | // 公共错误码 3 | COMMON: 404, 4 | // 特殊错误码 5 | TOKEN_INVALID: 401, 6 | // 禁止访问 7 | ACCESS_FORBIDDEN: 10003, 8 | // 权限已禁用 9 | PERMISSION_DISABLED: 10003, 10 | // 用户已冻结 11 | USER_DISABLED: 10004, 12 | }; 13 | -------------------------------------------------------------------------------- /21_Nest_v3/acl-test/src/user/dto/login-user.dto.ts: -------------------------------------------------------------------------------- 1 | import { IsNotEmpty, Length } from 'class-validator'; 2 | 3 | export class LoginUserDto { 4 | @IsNotEmpty() 5 | @Length(1, 50) 6 | username: string; 7 | 8 | @IsNotEmpty() 9 | @Length(1, 50) 10 | password: string; 11 | } 12 | -------------------------------------------------------------------------------- /21_Nest_v3/acl-test/test/jest-e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "moduleFileExtensions": ["js", "json", "ts"], 3 | "rootDir": ".", 4 | "testEnvironment": "node", 5 | "testRegex": ".e2e-spec.ts$", 6 | "transform": { 7 | "^.+\\.(t|j)s$": "ts-jest" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /21_Nest_v3/acl-test/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "exclude": ["node_modules", "test", "dist", "**/*spec.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /21_Nest_v3/config-test/.env: -------------------------------------------------------------------------------- 1 | aaa=1 2 | bbb=2 -------------------------------------------------------------------------------- /21_Nest_v3/config-test/.production.env: -------------------------------------------------------------------------------- 1 | aaa=111 2 | bbb=222 3 | -------------------------------------------------------------------------------- /21_Nest_v3/config-test/hello.yaml: -------------------------------------------------------------------------------- 1 | application: 2 | host: 'localhost' 3 | port: 8080 4 | 5 | db: 6 | mysql: 7 | url: 'localhost' 8 | port: 3306 9 | database: 'aaa' 10 | password: 'thunderchen' -------------------------------------------------------------------------------- /21_Nest_v3/config-test/index.js: -------------------------------------------------------------------------------- 1 | console.log(process.env.NODE_ENV); 2 | require('dotenv').config({ 3 | // path:'./.env' 4 | path: process.env.NODE_ENV === 'production' ? './production.env' : './.env', 5 | }) 6 | // console.log(4,process.env); 7 | 8 | console.log('aaa', process.env.aaa); 9 | console.log('bbb', process.env.bbb) -------------------------------------------------------------------------------- /21_Nest_v3/config-test/index2.js: -------------------------------------------------------------------------------- 1 | const yaml = require('js-yaml'); 2 | const fs = require('fs'); 3 | 4 | const config = fs.readFileSync('./hello.yaml'); 5 | 6 | console.log(yaml.load(config)); -------------------------------------------------------------------------------- /21_Nest_v3/docker-compose-test/.dockerignore: -------------------------------------------------------------------------------- 1 | # 忽略 node_modules 文件夹,避免将依赖包复制到镜像中 2 | node_modules/ 3 | 4 | # 忽略 dist 文件夹,避免将编译后的代码复制到镜像中 5 | dist/ 6 | 7 | # 忽略一些不需要的文件和文件夹,根据项目需要进行配置 8 | .git/ 9 | .vscode/ 10 | *.log 11 | *.md -------------------------------------------------------------------------------- /21_Nest_v3/docker-compose-test/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "trailingComma": "all" 4 | } -------------------------------------------------------------------------------- /21_Nest_v3/docker-compose-test/nest-cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/nest-cli", 3 | "collection": "@nestjs/schematics", 4 | "sourceRoot": "src", 5 | "compilerOptions": { 6 | "deleteOutDir": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /21_Nest_v3/docker-compose-test/src/app.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@nestjs/common'; 2 | 3 | @Injectable() 4 | export class AppService { 5 | getHello(): string { 6 | return 'Hello World!'; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /21_Nest_v3/docker-compose-test/src/dc/dc.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { DcService } from './dc.service'; 3 | import { DcController } from './dc.controller'; 4 | 5 | @Module({ 6 | controllers: [DcController], 7 | providers: [DcService] 8 | }) 9 | export class DcModule {} 10 | -------------------------------------------------------------------------------- /21_Nest_v3/docker-compose-test/src/dc/dto/create-dc.dto.ts: -------------------------------------------------------------------------------- 1 | export class CreateDcDto {} 2 | -------------------------------------------------------------------------------- /21_Nest_v3/docker-compose-test/src/dc/dto/update-dc.dto.ts: -------------------------------------------------------------------------------- 1 | import { PartialType } from '@nestjs/mapped-types'; 2 | import { CreateDcDto } from './create-dc.dto'; 3 | 4 | export class UpdateDcDto extends PartialType(CreateDcDto) {} 5 | -------------------------------------------------------------------------------- /21_Nest_v3/docker-compose-test/src/dc/entities/dc.entity.ts: -------------------------------------------------------------------------------- 1 | import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm'; 2 | 3 | @Entity() 4 | export class Dc { 5 | @PrimaryGeneratedColumn() 6 | id: number; 7 | 8 | @Column({ 9 | length: 30, 10 | }) 11 | aaa: string; 12 | 13 | @Column({ 14 | length: 30, 15 | }) 16 | bbb: string; 17 | } 18 | -------------------------------------------------------------------------------- /21_Nest_v3/docker-compose-test/src/main.ts: -------------------------------------------------------------------------------- 1 | import { NestFactory } from '@nestjs/core'; 2 | import { AppModule } from './app.module'; 3 | 4 | async function bootstrap() { 5 | const app = await NestFactory.create(AppModule); 6 | await app.listen(3000); 7 | } 8 | bootstrap(); 9 | -------------------------------------------------------------------------------- /21_Nest_v3/docker-compose-test/test/jest-e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "moduleFileExtensions": ["js", "json", "ts"], 3 | "rootDir": ".", 4 | "testEnvironment": "node", 5 | "testRegex": ".e2e-spec.ts$", 6 | "transform": { 7 | "^.+\\.(t|j)s$": "ts-jest" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /21_Nest_v3/docker-compose-test/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "exclude": ["node_modules", "test", "dist", "**/*spec.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /21_Nest_v3/docker-restart-test/dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:18-alpine3.14 2 | 3 | WORKDIR /app 4 | 5 | COPY ./index.ts . 6 | 7 | CMD [ "node",'/app/index.js' ] -------------------------------------------------------------------------------- /21_Nest_v3/docker-restart-test/index.js: -------------------------------------------------------------------------------- 1 | setTimeout(() => { 2 | throw new Error('xxx') 3 | },1000) -------------------------------------------------------------------------------- /21_Nest_v3/docker-restart-test/next.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:18-alpine3.14 2 | 3 | WORKDIR /app 4 | 5 | COPY ./index.js . 6 | 7 | RUN npm install -g pm2 8 | 9 | CMD [ "pm2-runtime","/app/index.js" ] 10 | -------------------------------------------------------------------------------- /21_Nest_v3/dockerfile-test/.dockerignore: -------------------------------------------------------------------------------- 1 | *.md 2 | node_modules/ 3 | .git/ 4 | .DS_Store 5 | .vscode/ 6 | .dockerignore -------------------------------------------------------------------------------- /21_Nest_v3/dockerfile-test/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "trailingComma": "all" 4 | } -------------------------------------------------------------------------------- /21_Nest_v3/dockerfile-test/1.dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:18 2 | 3 | WORKDIR /app 4 | 5 | COPY package.json . 6 | 7 | RUN npm config set registry https://registry.npmmirror.com/ 8 | 9 | RUN npm install 10 | 11 | COPY . . 12 | 13 | RUN npm run build 14 | 15 | EXPOSE 3000 16 | 17 | CMD [ "node", "./dist/main.js" ] -------------------------------------------------------------------------------- /21_Nest_v3/dockerfile-test/nest-cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/nest-cli", 3 | "collection": "@nestjs/schematics", 4 | "sourceRoot": "src", 5 | "compilerOptions": { 6 | "deleteOutDir": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /21_Nest_v3/dockerfile-test/src/app.controller.ts: -------------------------------------------------------------------------------- 1 | import { Controller, Get } from '@nestjs/common'; 2 | import { AppService } from './app.service'; 3 | 4 | @Controller() 5 | export class AppController { 6 | constructor(private readonly appService: AppService) {} 7 | 8 | @Get() 9 | getHello(): string { 10 | return this.appService.getHello(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /21_Nest_v3/dockerfile-test/src/app.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { AppController } from './app.controller'; 3 | import { AppService } from './app.service'; 4 | 5 | @Module({ 6 | imports: [], 7 | controllers: [AppController], 8 | providers: [AppService], 9 | }) 10 | export class AppModule {} 11 | -------------------------------------------------------------------------------- /21_Nest_v3/dockerfile-test/src/app.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@nestjs/common'; 2 | 3 | @Injectable() 4 | export class AppService { 5 | getHello(): string { 6 | return 'Hello World!'; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /21_Nest_v3/dockerfile-test/src/main.ts: -------------------------------------------------------------------------------- 1 | import { NestFactory } from '@nestjs/core'; 2 | import { AppModule } from './app.module'; 3 | 4 | async function bootstrap() { 5 | const app = await NestFactory.create(AppModule); 6 | await app.listen(3000); 7 | } 8 | bootstrap(); 9 | -------------------------------------------------------------------------------- /21_Nest_v3/dockerfile-test/test/jest-e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "moduleFileExtensions": ["js", "json", "ts"], 3 | "rootDir": ".", 4 | "testEnvironment": "node", 5 | "testRegex": ".e2e-spec.ts$", 6 | "transform": { 7 | "^.+\\.(t|j)s$": "ts-jest" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /21_Nest_v3/dockerfile-test/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "exclude": ["node_modules", "test", "dist", "**/*spec.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /21_Nest_v3/email-login-backend/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "trailingComma": "all" 4 | } -------------------------------------------------------------------------------- /21_Nest_v3/email-login-backend/nest-cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/nest-cli", 3 | "collection": "@nestjs/schematics", 4 | "sourceRoot": "src", 5 | "compilerOptions": { 6 | "deleteOutDir": true, 7 | "watchAssets": true, 8 | "assets": ["*.env"] 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /21_Nest_v3/email-login-backend/src/.env: -------------------------------------------------------------------------------- 1 | email_user=853524319@qq.com 2 | email_password=tuppiawhmbsabcgj -------------------------------------------------------------------------------- /21_Nest_v3/email-login-backend/src/app.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@nestjs/common'; 2 | 3 | @Injectable() 4 | export class AppService { 5 | getHello(): string { 6 | return 'Hello World!'; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /21_Nest_v3/email-login-backend/src/email/dto/create-email.dto.ts: -------------------------------------------------------------------------------- 1 | export class CreateEmailDto {} 2 | -------------------------------------------------------------------------------- /21_Nest_v3/email-login-backend/src/email/dto/update-email.dto.ts: -------------------------------------------------------------------------------- 1 | import { PartialType } from '@nestjs/mapped-types'; 2 | import { CreateEmailDto } from './create-email.dto'; 3 | 4 | export class UpdateEmailDto extends PartialType(CreateEmailDto) {} 5 | -------------------------------------------------------------------------------- /21_Nest_v3/email-login-backend/src/email/email.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { EmailService } from './email.service'; 3 | import { EmailController } from './email.controller'; 4 | 5 | 6 | @Module({ 7 | controllers: [EmailController], 8 | providers: [EmailService], 9 | }) 10 | export class EmailModule {} 11 | -------------------------------------------------------------------------------- /21_Nest_v3/email-login-backend/src/email/entities/email.entity.ts: -------------------------------------------------------------------------------- 1 | export class Email {} 2 | -------------------------------------------------------------------------------- /21_Nest_v3/email-login-backend/src/redis/dto/create-redi.dto.ts: -------------------------------------------------------------------------------- 1 | export class CreateRediDto {} 2 | -------------------------------------------------------------------------------- /21_Nest_v3/email-login-backend/src/redis/dto/update-redi.dto.ts: -------------------------------------------------------------------------------- 1 | import { PartialType } from '@nestjs/mapped-types'; 2 | import { CreateRediDto } from './create-redi.dto'; 3 | 4 | export class UpdateRediDto extends PartialType(CreateRediDto) {} 5 | -------------------------------------------------------------------------------- /21_Nest_v3/email-login-backend/src/redis/entities/redi.entity.ts: -------------------------------------------------------------------------------- 1 | export class Redi {} 2 | -------------------------------------------------------------------------------- /21_Nest_v3/email-login-backend/src/user/dto/create-user.dto.ts: -------------------------------------------------------------------------------- 1 | export class CreateUserDto {} 2 | -------------------------------------------------------------------------------- /21_Nest_v3/email-login-backend/src/user/dto/login-user.dto.ts: -------------------------------------------------------------------------------- 1 | import { IsEmail, IsNotEmpty, Length } from 'class-validator'; 2 | 3 | export class LoginUserDto { 4 | @IsNotEmpty() 5 | @IsEmail() 6 | email: string; 7 | 8 | @IsNotEmpty() 9 | @Length(6) 10 | code: string; 11 | } 12 | -------------------------------------------------------------------------------- /21_Nest_v3/email-login-backend/src/user/dto/update-user.dto.ts: -------------------------------------------------------------------------------- 1 | import { PartialType } from '@nestjs/mapped-types'; 2 | import { CreateUserDto } from './create-user.dto'; 3 | 4 | export class UpdateUserDto extends PartialType(CreateUserDto) {} 5 | -------------------------------------------------------------------------------- /21_Nest_v3/email-login-backend/src/user/user.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { UserService } from './user.service'; 3 | import { UserController } from './user.controller'; 4 | 5 | @Module({ 6 | controllers: [UserController], 7 | providers: [UserService], 8 | }) 9 | export class UserModule {} 10 | -------------------------------------------------------------------------------- /21_Nest_v3/email-login-backend/test/jest-e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "moduleFileExtensions": ["js", "json", "ts"], 3 | "rootDir": ".", 4 | "testEnvironment": "node", 5 | "testRegex": ".e2e-spec.ts$", 6 | "transform": { 7 | "^.+\\.(t|j)s$": "ts-jest" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /21_Nest_v3/email-login-backend/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "exclude": ["node_modules", "test", "dist", "**/*spec.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /21_Nest_v3/email-login-frontend/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/21_Nest_v3/email-login-frontend/public/favicon.ico -------------------------------------------------------------------------------- /21_Nest_v3/email-login-frontend/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/21_Nest_v3/email-login-frontend/public/logo192.png -------------------------------------------------------------------------------- /21_Nest_v3/email-login-frontend/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/21_Nest_v3/email-login-frontend/public/logo512.png -------------------------------------------------------------------------------- /21_Nest_v3/email-login-frontend/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /21_Nest_v3/email-login-frontend/src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom'; 6 | -------------------------------------------------------------------------------- /21_Nest_v3/exception-filter/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "trailingComma": "all" 4 | } -------------------------------------------------------------------------------- /21_Nest_v3/exception-filter/nest-cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/nest-cli", 3 | "collection": "@nestjs/schematics", 4 | "sourceRoot": "src", 5 | "compilerOptions": { 6 | "deleteOutDir": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /21_Nest_v3/exception-filter/src/app.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@nestjs/common'; 2 | 3 | @Injectable() 4 | export class AppService { 5 | getHello(): string { 6 | return 'Hello World!'; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /21_Nest_v3/exception-filter/test/jest-e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "moduleFileExtensions": ["js", "json", "ts"], 3 | "rootDir": ".", 4 | "testEnvironment": "node", 5 | "testRegex": ".e2e-spec.ts$", 6 | "transform": { 7 | "^.+\\.(t|j)s$": "ts-jest" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /21_Nest_v3/exception-filter/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "exclude": ["node_modules", "test", "dist", "**/*spec.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /21_Nest_v3/express-upload/my-uploads/aaa-1689520081407-938455620-WIN_20230701_14_59_38_Pro.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/21_Nest_v3/express-upload/my-uploads/aaa-1689520081407-938455620-WIN_20230701_14_59_38_Pro.jpg -------------------------------------------------------------------------------- /21_Nest_v3/express-upload/uploads/0d8596f98556f39a3a2040edd8b7a5f5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/21_Nest_v3/express-upload/uploads/0d8596f98556f39a3a2040edd8b7a5f5 -------------------------------------------------------------------------------- /21_Nest_v3/express-upload/uploads/9a47aa63bb19b6522e0cfdbb05175b7b: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/21_Nest_v3/express-upload/uploads/9a47aa63bb19b6522e0cfdbb05175b7b -------------------------------------------------------------------------------- /21_Nest_v3/jwt-and-session/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "trailingComma": "all" 4 | } -------------------------------------------------------------------------------- /21_Nest_v3/jwt-and-session/nest-cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/nest-cli", 3 | "collection": "@nestjs/schematics", 4 | "sourceRoot": "src", 5 | "compilerOptions": { 6 | "deleteOutDir": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /21_Nest_v3/jwt-and-session/src/app.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@nestjs/common'; 2 | 3 | @Injectable() 4 | export class AppService { 5 | getHello(): string { 6 | return 'Hello World!'; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /21_Nest_v3/jwt-and-session/test/jest-e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "moduleFileExtensions": ["js", "json", "ts"], 3 | "rootDir": ".", 4 | "testEnvironment": "node", 5 | "testRegex": ".e2e-spec.ts$", 6 | "transform": { 7 | "^.+\\.(t|j)s$": "ts-jest" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /21_Nest_v3/jwt-and-session/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "exclude": ["node_modules", "test", "dist", "**/*spec.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /21_Nest_v3/login-and-register/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "trailingComma": "all" 4 | } -------------------------------------------------------------------------------- /21_Nest_v3/login-and-register/nest-cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/nest-cli", 3 | "collection": "@nestjs/schematics", 4 | "sourceRoot": "src", 5 | "compilerOptions": { 6 | "deleteOutDir": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /21_Nest_v3/login-and-register/src/app.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@nestjs/common'; 2 | 3 | @Injectable() 4 | export class AppService { 5 | getHello(): string { 6 | return 'Hello World!'; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /21_Nest_v3/login-and-register/src/main.ts: -------------------------------------------------------------------------------- 1 | import { NestFactory } from '@nestjs/core'; 2 | import { AppModule } from './app.module'; 3 | 4 | async function bootstrap() { 5 | const app = await NestFactory.create(AppModule); 6 | await app.listen(3000); 7 | } 8 | bootstrap(); 9 | -------------------------------------------------------------------------------- /21_Nest_v3/login-and-register/src/user/dto/create-user.dto.ts: -------------------------------------------------------------------------------- 1 | export class CreateUserDto {} 2 | -------------------------------------------------------------------------------- /21_Nest_v3/login-and-register/src/user/dto/login_dto.ts: -------------------------------------------------------------------------------- 1 | export class LoginDto { 2 | username: string; 3 | password: string; 4 | } 5 | -------------------------------------------------------------------------------- /21_Nest_v3/login-and-register/src/user/dto/update-user.dto.ts: -------------------------------------------------------------------------------- 1 | import { PartialType } from '@nestjs/mapped-types'; 2 | import { CreateUserDto } from './create-user.dto'; 3 | 4 | export class UpdateUserDto extends PartialType(CreateUserDto) {} 5 | -------------------------------------------------------------------------------- /21_Nest_v3/login-and-register/test/jest-e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "moduleFileExtensions": ["js", "json", "ts"], 3 | "rootDir": ".", 4 | "testEnvironment": "node", 5 | "testRegex": ".e2e-spec.ts$", 6 | "transform": { 7 | "^.+\\.(t|j)s$": "ts-jest" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /21_Nest_v3/login-and-register/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "exclude": ["node_modules", "test", "dist", "**/*spec.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /21_Nest_v3/nest-config-test/.aaa.env: -------------------------------------------------------------------------------- 1 | aaa=3 -------------------------------------------------------------------------------- /21_Nest_v3/nest-config-test/.env: -------------------------------------------------------------------------------- 1 | aaa=1 2 | bbb=2 -------------------------------------------------------------------------------- /21_Nest_v3/nest-config-test/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "trailingComma": "all" 4 | } -------------------------------------------------------------------------------- /21_Nest_v3/nest-config-test/aaa.yaml: -------------------------------------------------------------------------------- 1 | application: 2 | host: 'localhost' 3 | port: 8080 4 | 5 | aaa: 6 | bbb: 7 | ccc: 'ccc' 8 | port: 3306 9 | -------------------------------------------------------------------------------- /21_Nest_v3/nest-config-test/config.ts: -------------------------------------------------------------------------------- 1 | export default async () => { 2 | const dbPort = await 3306; 3 | 4 | return { 5 | port: parseInt(process.env.PORT, 10) || 3000, 6 | db: { 7 | host: 'localhost', 8 | port: dbPort, 9 | }, 10 | }; 11 | }; 12 | -------------------------------------------------------------------------------- /21_Nest_v3/nest-config-test/config2.ts: -------------------------------------------------------------------------------- 1 | import { readFile } from 'fs/promises'; 2 | import * as yaml from 'js-yaml'; 3 | import { join } from 'path'; 4 | 5 | export default async () => { 6 | const configFilePath = join(process.cwd(), 'aaa.yaml'); 7 | 8 | const config = await readFile(configFilePath); 9 | 10 | return yaml.load(config); 11 | }; 12 | -------------------------------------------------------------------------------- /21_Nest_v3/nest-config-test/nest-cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/nest-cli", 3 | "collection": "@nestjs/schematics", 4 | "sourceRoot": "src", 5 | "compilerOptions": { 6 | "deleteOutDir": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /21_Nest_v3/nest-config-test/src/app.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@nestjs/common'; 2 | 3 | @Injectable() 4 | export class AppService { 5 | getHello(): string { 6 | return 'Hello World!'; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /21_Nest_v3/nest-config-test/src/bbb/dto/create-bbb.dto.ts: -------------------------------------------------------------------------------- 1 | export class CreateBbbDto {} 2 | -------------------------------------------------------------------------------- /21_Nest_v3/nest-config-test/src/bbb/dto/update-bbb.dto.ts: -------------------------------------------------------------------------------- 1 | import { PartialType } from '@nestjs/mapped-types'; 2 | import { CreateBbbDto } from './create-bbb.dto'; 3 | 4 | export class UpdateBbbDto extends PartialType(CreateBbbDto) {} 5 | -------------------------------------------------------------------------------- /21_Nest_v3/nest-config-test/src/bbb/entities/bbb.entity.ts: -------------------------------------------------------------------------------- 1 | export class Bbb {} 2 | -------------------------------------------------------------------------------- /21_Nest_v3/nest-config-test/src/main.ts: -------------------------------------------------------------------------------- 1 | import { NestFactory } from '@nestjs/core'; 2 | import { AppModule } from './app.module'; 3 | 4 | async function bootstrap() { 5 | const app = await NestFactory.create(AppModule); 6 | await app.listen(3000); 7 | } 8 | bootstrap(); 9 | -------------------------------------------------------------------------------- /21_Nest_v3/nest-config-test/test/jest-e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "moduleFileExtensions": ["js", "json", "ts"], 3 | "rootDir": ".", 4 | "testEnvironment": "node", 5 | "testRegex": ".e2e-spec.ts$", 6 | "transform": { 7 | "^.+\\.(t|j)s$": "ts-jest" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /21_Nest_v3/nest-config-test/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "exclude": ["node_modules", "test", "dist", "**/*spec.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /21_Nest_v3/nest-redis/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "trailingComma": "all" 4 | } -------------------------------------------------------------------------------- /21_Nest_v3/nest-redis/nest-cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/nest-cli", 3 | "collection": "@nestjs/schematics", 4 | "sourceRoot": "src", 5 | "compilerOptions": { 6 | "deleteOutDir": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /21_Nest_v3/nest-redis/src/app.controller.ts: -------------------------------------------------------------------------------- 1 | import { Controller, Get } from '@nestjs/common'; 2 | import { AppService } from './app.service'; 3 | 4 | @Controller() 5 | export class AppController { 6 | constructor(private readonly appService: AppService) {} 7 | 8 | @Get() 9 | async getHello() { 10 | return await this.appService.getHello(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /21_Nest_v3/nest-redis/src/main.ts: -------------------------------------------------------------------------------- 1 | import { NestFactory } from '@nestjs/core'; 2 | import { AppModule } from './app.module'; 3 | 4 | async function bootstrap() { 5 | const app = await NestFactory.create(AppModule); 6 | await app.listen(3000); 7 | } 8 | bootstrap(); 9 | -------------------------------------------------------------------------------- /21_Nest_v3/nest-redis/test/jest-e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "moduleFileExtensions": ["js", "json", "ts"], 3 | "rootDir": ".", 4 | "testEnvironment": "node", 5 | "testRegex": ".e2e-spec.ts$", 6 | "transform": { 7 | "^.+\\.(t|j)s$": "ts-jest" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /21_Nest_v3/nest-redis/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "exclude": ["node_modules", "test", "dist", "**/*spec.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /21_Nest_v3/nest-typeorm/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "trailingComma": "all" 4 | } -------------------------------------------------------------------------------- /21_Nest_v3/nest-typeorm/nest-cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/nest-cli", 3 | "collection": "@nestjs/schematics", 4 | "sourceRoot": "src", 5 | "compilerOptions": { 6 | "deleteOutDir": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /21_Nest_v3/nest-typeorm/src/app.controller.ts: -------------------------------------------------------------------------------- 1 | import { Controller, Get } from '@nestjs/common'; 2 | import { AppService } from './app.service'; 3 | 4 | @Controller() 5 | export class AppController { 6 | constructor(private readonly appService: AppService) {} 7 | 8 | @Get() 9 | getHello(): string { 10 | return this.appService.getHello(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /21_Nest_v3/nest-typeorm/src/app.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@nestjs/common'; 2 | 3 | @Injectable() 4 | export class AppService { 5 | getHello(): string { 6 | return 'Hello World!'; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /21_Nest_v3/nest-typeorm/src/main.ts: -------------------------------------------------------------------------------- 1 | import { NestFactory } from '@nestjs/core'; 2 | import { AppModule } from './app.module'; 3 | 4 | async function bootstrap() { 5 | const app = await NestFactory.create(AppModule); 6 | await app.listen(3000); 7 | } 8 | bootstrap(); 9 | -------------------------------------------------------------------------------- /21_Nest_v3/nest-typeorm/src/user/dto/create-user.dto.ts: -------------------------------------------------------------------------------- 1 | export class CreateUserDto {} 2 | -------------------------------------------------------------------------------- /21_Nest_v3/nest-typeorm/src/user/dto/update-user.dto.ts: -------------------------------------------------------------------------------- 1 | import { PartialType } from '@nestjs/mapped-types'; 2 | import { CreateUserDto } from './create-user.dto'; 3 | 4 | export class UpdateUserDto extends PartialType(CreateUserDto) {} 5 | -------------------------------------------------------------------------------- /21_Nest_v3/nest-typeorm/src/user/entities/user.entity.ts: -------------------------------------------------------------------------------- 1 | import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm'; 2 | 3 | @Entity({ 4 | name: 'aaa_user', 5 | }) 6 | export class User { 7 | @PrimaryGeneratedColumn() 8 | id: number; 9 | 10 | @Column({ 11 | name: 'aaa_name', 12 | length: 50, 13 | }) 14 | name: string; 15 | } 16 | -------------------------------------------------------------------------------- /21_Nest_v3/nest-typeorm/test/jest-e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "moduleFileExtensions": ["js", "json", "ts"], 3 | "rootDir": ".", 4 | "testEnvironment": "node", 5 | "testRegex": ".e2e-spec.ts$", 6 | "transform": { 7 | "^.+\\.(t|j)s$": "ts-jest" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /21_Nest_v3/nest-typeorm/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "exclude": ["node_modules", "test", "dist", "**/*spec.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /21_Nest_v3/nginx-nest-app/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "trailingComma": "all" 4 | } -------------------------------------------------------------------------------- /21_Nest_v3/nginx-nest-app/nest-cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/nest-cli", 3 | "collection": "@nestjs/schematics", 4 | "sourceRoot": "src", 5 | "compilerOptions": { 6 | "deleteOutDir": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /21_Nest_v3/nginx-nest-app/src/app.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { AppController } from './app.controller'; 3 | import { AppService } from './app.service'; 4 | 5 | @Module({ 6 | imports: [], 7 | controllers: [AppController], 8 | providers: [AppService], 9 | }) 10 | export class AppModule {} 11 | -------------------------------------------------------------------------------- /21_Nest_v3/nginx-nest-app/src/app.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@nestjs/common'; 2 | 3 | @Injectable() 4 | export class AppService { 5 | getHello(): string { 6 | return 'nginx proxy!'; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /21_Nest_v3/nginx-nest-app/src/main.ts: -------------------------------------------------------------------------------- 1 | import { NestFactory } from '@nestjs/core'; 2 | import { AppModule } from './app.module'; 3 | 4 | async function bootstrap() { 5 | const app = await NestFactory.create(AppModule); 6 | //添加全局API 7 | app.setGlobalPrefix('/api'); 8 | 9 | await app.listen(3000); 10 | } 11 | bootstrap(); 12 | -------------------------------------------------------------------------------- /21_Nest_v3/nginx-nest-app/test/jest-e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "moduleFileExtensions": ["js", "json", "ts"], 3 | "rootDir": ".", 4 | "testEnvironment": "node", 5 | "testRegex": ".e2e-spec.ts$", 6 | "transform": { 7 | "^.+\\.(t|j)s$": "ts-jest" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /21_Nest_v3/nginx-nest-app/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "exclude": ["node_modules", "test", "dist", "**/*spec.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /21_Nest_v3/nginx_gray_test/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "trailingComma": "all" 4 | } -------------------------------------------------------------------------------- /21_Nest_v3/nginx_gray_test/nest-cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/nest-cli", 3 | "collection": "@nestjs/schematics", 4 | "sourceRoot": "src", 5 | "compilerOptions": { 6 | "deleteOutDir": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /21_Nest_v3/nginx_gray_test/src/app.controller.ts: -------------------------------------------------------------------------------- 1 | import { Controller, Get } from '@nestjs/common'; 2 | import { AppService } from './app.service'; 3 | 4 | @Controller() 5 | export class AppController { 6 | constructor(private readonly appService: AppService) {} 7 | 8 | @Get() 9 | getHello(): string { 10 | return this.appService.getHello(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /21_Nest_v3/nginx_gray_test/src/app.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { AppController } from './app.controller'; 3 | import { AppService } from './app.service'; 4 | 5 | @Module({ 6 | imports: [], 7 | controllers: [AppController], 8 | providers: [AppService], 9 | }) 10 | export class AppModule {} 11 | -------------------------------------------------------------------------------- /21_Nest_v3/nginx_gray_test/src/app.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@nestjs/common'; 2 | 3 | @Injectable() 4 | export class AppService { 5 | getHello(): string { 6 | return 'Hello World! 222'; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /21_Nest_v3/nginx_gray_test/src/main.ts: -------------------------------------------------------------------------------- 1 | import { NestFactory } from '@nestjs/core'; 2 | import { AppModule } from './app.module'; 3 | 4 | async function bootstrap() { 5 | const app = await NestFactory.create(AppModule); 6 | await app.listen(3001); 7 | } 8 | bootstrap(); 9 | -------------------------------------------------------------------------------- /21_Nest_v3/nginx_gray_test/test/jest-e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "moduleFileExtensions": ["js", "json", "ts"], 3 | "rootDir": ".", 4 | "testEnvironment": "node", 5 | "testRegex": ".e2e-spec.ts$", 6 | "transform": { 7 | "^.+\\.(t|j)s$": "ts-jest" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /21_Nest_v3/nginx_gray_test/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "exclude": ["node_modules", "test", "dist", "**/*spec.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /21_Nest_v3/node-email/test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Document 7 | 8 | 9 |

thunderchen

10 | 11 | 12 | -------------------------------------------------------------------------------- /21_Nest_v3/pass/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "trailingComma": "all" 4 | } -------------------------------------------------------------------------------- /21_Nest_v3/pass/nest-cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/nest-cli", 3 | "collection": "@nestjs/schematics", 4 | "sourceRoot": "src", 5 | "compilerOptions": { 6 | "deleteOutDir": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /21_Nest_v3/pass/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Document 7 | 8 | 9 | thunderchen 10 | 11 | -------------------------------------------------------------------------------- /21_Nest_v3/pass/src/aaa/dto/create-aaa.dto.ts: -------------------------------------------------------------------------------- 1 | export class CreateAaaDto {} 2 | -------------------------------------------------------------------------------- /21_Nest_v3/pass/src/aaa/dto/update-aaa.dto.ts: -------------------------------------------------------------------------------- 1 | import { PartialType } from '@nestjs/mapped-types'; 2 | import { CreateAaaDto } from './create-aaa.dto'; 3 | 4 | export class UpdateAaaDto extends PartialType(CreateAaaDto) {} 5 | -------------------------------------------------------------------------------- /21_Nest_v3/pass/src/aaa/entities/aaa.entity.ts: -------------------------------------------------------------------------------- 1 | export class Aaa {} 2 | -------------------------------------------------------------------------------- /21_Nest_v3/pass/src/bbb/dto/create-bbb.dto.ts: -------------------------------------------------------------------------------- 1 | export class CreateBbbDto {} 2 | -------------------------------------------------------------------------------- /21_Nest_v3/pass/src/bbb/dto/update-bbb.dto.ts: -------------------------------------------------------------------------------- 1 | import { PartialType } from '@nestjs/mapped-types'; 2 | import { CreateBbbDto } from './create-bbb.dto'; 3 | 4 | export class UpdateBbbDto extends PartialType(CreateBbbDto) {} 5 | -------------------------------------------------------------------------------- /21_Nest_v3/pass/src/bbb/entities/bbb.entity.ts: -------------------------------------------------------------------------------- 1 | export class Bbb {} 2 | -------------------------------------------------------------------------------- /21_Nest_v3/pass/src/ccc/dto/create-ccc.dto.ts: -------------------------------------------------------------------------------- 1 | export class CreateCccDto {} 2 | -------------------------------------------------------------------------------- /21_Nest_v3/pass/src/ccc/dto/update-ccc.dto.ts: -------------------------------------------------------------------------------- 1 | import { PartialType } from '@nestjs/mapped-types'; 2 | import { CreateCccDto } from './create-ccc.dto'; 3 | 4 | export class UpdateCccDto extends PartialType(CreateCccDto) {} 5 | -------------------------------------------------------------------------------- /21_Nest_v3/pass/src/ccc/entities/ccc.entity.ts: -------------------------------------------------------------------------------- 1 | export class Ccc {} 2 | -------------------------------------------------------------------------------- /21_Nest_v3/pass/src/ddd/ddd.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { DddService } from './ddd.service'; 3 | import { DddController } from './ddd.controller'; 4 | 5 | @Module({ 6 | controllers: [DddController], 7 | providers: [DddService], 8 | }) 9 | export class DddModule {} 10 | -------------------------------------------------------------------------------- /21_Nest_v3/pass/src/ddd/dto/create-ddd.dto.ts: -------------------------------------------------------------------------------- 1 | export class CreateDddDto {} 2 | -------------------------------------------------------------------------------- /21_Nest_v3/pass/src/ddd/dto/update-ddd.dto.ts: -------------------------------------------------------------------------------- 1 | import { PartialType } from '@nestjs/mapped-types'; 2 | import { CreateDddDto } from './create-ddd.dto'; 3 | 4 | export class UpdateDddDto extends PartialType(CreateDddDto) {} 5 | -------------------------------------------------------------------------------- /21_Nest_v3/pass/src/ddd/entities/ddd.entity.ts: -------------------------------------------------------------------------------- 1 | export class Ddd {} 2 | -------------------------------------------------------------------------------- /21_Nest_v3/pass/src/dynamic-module/dto/create-dynamic-module.dto.ts: -------------------------------------------------------------------------------- 1 | export class CreateDynamicModuleDto {} 2 | -------------------------------------------------------------------------------- /21_Nest_v3/pass/src/dynamic-module/dto/update-dynamic-module.dto.ts: -------------------------------------------------------------------------------- 1 | import { PartialType } from '@nestjs/mapped-types'; 2 | import { CreateDynamicModuleDto } from './create-dynamic-module.dto'; 3 | 4 | export class UpdateDynamicModuleDto extends PartialType( 5 | CreateDynamicModuleDto, 6 | ) {} 7 | -------------------------------------------------------------------------------- /21_Nest_v3/pass/src/dynamic-module/entities/dynamic-module.entity.ts: -------------------------------------------------------------------------------- 1 | export class DynamicModule {} 2 | -------------------------------------------------------------------------------- /21_Nest_v3/pass/src/filter/AaaException.ts: -------------------------------------------------------------------------------- 1 | export class AaaException { 2 | constructor(public aaa: string, public bbb: string) {} 3 | } 4 | -------------------------------------------------------------------------------- /21_Nest_v3/pass/src/logger/logger.module.ts: -------------------------------------------------------------------------------- 1 | import { DynamicModule, Global, Module } from '@nestjs/common'; 2 | import { MyLogger2 } from 'src/customLogger/MyLogger'; 3 | 4 | @Global() 5 | @Module({ 6 | providers: [MyLogger2], 7 | exports: [MyLogger2], 8 | }) 9 | export class LoggerModule {} 10 | -------------------------------------------------------------------------------- /21_Nest_v3/pass/src/modulea/modulea.module.ts: -------------------------------------------------------------------------------- 1 | import { Module, forwardRef } from '@nestjs/common'; 2 | import { ModulebModule } from 'src/moduleb/moduleb.module'; 3 | 4 | @Module({ 5 | imports: [forwardRef(() => ModulebModule)], 6 | }) 7 | export class ModuleaModule {} 8 | -------------------------------------------------------------------------------- /21_Nest_v3/pass/src/moduleb/moduleb.module.ts: -------------------------------------------------------------------------------- 1 | import { Module, forwardRef } from '@nestjs/common'; 2 | import { ModuleaModule } from 'src/modulea/modulea.module'; 3 | 4 | @Module({ 5 | imports: [forwardRef(() => ModuleaModule)], 6 | }) 7 | export class ModulebModule {} 8 | -------------------------------------------------------------------------------- /21_Nest_v3/pass/src/person/dto/create-person.dto.ts: -------------------------------------------------------------------------------- 1 | export class CreatePersonDto { 2 | name: string; 3 | age: number; 4 | } 5 | -------------------------------------------------------------------------------- /21_Nest_v3/pass/src/person/dto/update-person.dto.ts: -------------------------------------------------------------------------------- 1 | import { PartialType } from '@nestjs/mapped-types'; 2 | import { CreatePersonDto } from './create-person.dto'; 3 | 4 | export class UpdatePersonDto extends PartialType(CreatePersonDto) {} 5 | -------------------------------------------------------------------------------- /21_Nest_v3/pass/src/person/entities/person.entity.ts: -------------------------------------------------------------------------------- 1 | export class Person {} 2 | -------------------------------------------------------------------------------- /21_Nest_v3/pass/src/person/person.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { PersonService } from './person.service'; 3 | import { PersonController } from './person.controller'; 4 | 5 | @Module({ 6 | controllers: [PersonController], 7 | providers: [PersonService], 8 | }) 9 | export class PersonModule {} 10 | -------------------------------------------------------------------------------- /21_Nest_v3/pass/src/role/role.decorator.ts: -------------------------------------------------------------------------------- 1 | import { SetMetadata } from '@nestjs/common'; 2 | import { Role } from './role'; 3 | 4 | export const Roles = (...args: Role[]) => SetMetadata('role', args); 5 | -------------------------------------------------------------------------------- /21_Nest_v3/pass/src/role/role.ts: -------------------------------------------------------------------------------- 1 | export enum Role { 2 | User = 'user', 3 | Admin = 'admin', 4 | } 5 | -------------------------------------------------------------------------------- /21_Nest_v3/pass/src/test-pipe/dto/create-test-pipe.dto.ts: -------------------------------------------------------------------------------- 1 | import { IsInt } from 'class-validator'; 2 | 3 | export class CreateTestPipeDto { 4 | name: string; 5 | @IsInt() 6 | age: number; 7 | sex: boolean; 8 | hobbies: Array; 9 | } 10 | -------------------------------------------------------------------------------- /21_Nest_v3/pass/src/test-pipe/dto/update-test-pipe.dto.ts: -------------------------------------------------------------------------------- 1 | import { PartialType } from '@nestjs/mapped-types'; 2 | import { CreateTestPipeDto } from './create-test-pipe.dto'; 3 | 4 | export class UpdateTestPipeDto extends PartialType(CreateTestPipeDto) {} 5 | -------------------------------------------------------------------------------- /21_Nest_v3/pass/src/test-pipe/entities/test-pipe.entity.ts: -------------------------------------------------------------------------------- 1 | export class TestPipe {} 2 | -------------------------------------------------------------------------------- /21_Nest_v3/pass/src/testloggermodule/dto/create-testloggermodule.dto.ts: -------------------------------------------------------------------------------- 1 | export class CreateTestloggermoduleDto {} 2 | -------------------------------------------------------------------------------- /21_Nest_v3/pass/src/testloggermodule/dto/update-testloggermodule.dto.ts: -------------------------------------------------------------------------------- 1 | import { PartialType } from '@nestjs/mapped-types'; 2 | import { CreateTestloggermoduleDto } from './create-testloggermodule.dto'; 3 | 4 | export class UpdateTestloggermoduleDto extends PartialType(CreateTestloggermoduleDto) {} 5 | -------------------------------------------------------------------------------- /21_Nest_v3/pass/src/testloggermodule/entities/testloggermodule.entity.ts: -------------------------------------------------------------------------------- 1 | export class Testloggermodule {} 2 | -------------------------------------------------------------------------------- /21_Nest_v3/pass/test/jest-e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "moduleFileExtensions": ["js", "json", "ts"], 3 | "rootDir": ".", 4 | "testEnvironment": "node", 5 | "testRegex": ".e2e-spec.ts$", 6 | "transform": { 7 | "^.+\\.(t|j)s$": "ts-jest" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /21_Nest_v3/pass/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "exclude": ["node_modules", "test", "dist", "**/*spec.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /21_Nest_v3/pass/uploads/0239c3afef41dc6cd47e8e3def358d20: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/21_Nest_v3/pass/uploads/0239c3afef41dc6cd47e8e3def358d20 -------------------------------------------------------------------------------- /21_Nest_v3/pass/uploads/287bb20105e93e445689f38316a044d0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/21_Nest_v3/pass/uploads/287bb20105e93e445689f38316a044d0 -------------------------------------------------------------------------------- /21_Nest_v3/pass/uploads/72e46369ebfcdc5e2c093747b1d83b5b: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/21_Nest_v3/pass/uploads/72e46369ebfcdc5e2c093747b1d83b5b -------------------------------------------------------------------------------- /21_Nest_v3/pass/uploads/8a0ee4af71b81603d8da4958a14cc1ef: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/21_Nest_v3/pass/uploads/8a0ee4af71b81603d8da4958a14cc1ef -------------------------------------------------------------------------------- /21_Nest_v3/qrcode-login/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "trailingComma": "all" 4 | } -------------------------------------------------------------------------------- /21_Nest_v3/qrcode-login/nest-cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/nest-cli", 3 | "collection": "@nestjs/schematics", 4 | "sourceRoot": "src", 5 | "compilerOptions": { 6 | "deleteOutDir": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /21_Nest_v3/qrcode-login/src/app.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@nestjs/common'; 2 | 3 | @Injectable() 4 | export class AppService { 5 | getHello(): string { 6 | return 'Hello World!'; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /21_Nest_v3/qrcode-login/test/jest-e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "moduleFileExtensions": ["js", "json", "ts"], 3 | "rootDir": ".", 4 | "testEnvironment": "node", 5 | "testRegex": ".e2e-spec.ts$", 6 | "transform": { 7 | "^.+\\.(t|j)s$": "ts-jest" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /21_Nest_v3/qrcode-login/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "exclude": ["node_modules", "test", "dist", "**/*spec.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /21_Nest_v3/rbac-test/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "trailingComma": "all" 4 | } -------------------------------------------------------------------------------- /21_Nest_v3/rbac-test/nest-cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/nest-cli", 3 | "collection": "@nestjs/schematics", 4 | "sourceRoot": "src", 5 | "compilerOptions": { 6 | "deleteOutDir": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /21_Nest_v3/rbac-test/src/aaa/aaa.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { AaaService } from './aaa.service'; 3 | import { AaaController } from './aaa.controller'; 4 | 5 | @Module({ 6 | controllers: [AaaController], 7 | providers: [AaaService] 8 | }) 9 | export class AaaModule {} 10 | -------------------------------------------------------------------------------- /21_Nest_v3/rbac-test/src/aaa/dto/create-aaa.dto.ts: -------------------------------------------------------------------------------- 1 | export class CreateAaaDto {} 2 | -------------------------------------------------------------------------------- /21_Nest_v3/rbac-test/src/aaa/dto/update-aaa.dto.ts: -------------------------------------------------------------------------------- 1 | import { PartialType } from '@nestjs/mapped-types'; 2 | import { CreateAaaDto } from './create-aaa.dto'; 3 | 4 | export class UpdateAaaDto extends PartialType(CreateAaaDto) {} 5 | -------------------------------------------------------------------------------- /21_Nest_v3/rbac-test/src/aaa/entities/aaa.entity.ts: -------------------------------------------------------------------------------- 1 | export class Aaa {} 2 | -------------------------------------------------------------------------------- /21_Nest_v3/rbac-test/src/app.controller.ts: -------------------------------------------------------------------------------- 1 | import { Controller, Get } from '@nestjs/common'; 2 | import { AppService } from './app.service'; 3 | 4 | @Controller() 5 | export class AppController { 6 | constructor(private readonly appService: AppService) {} 7 | 8 | @Get() 9 | getHello(): string { 10 | return this.appService.getHello(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /21_Nest_v3/rbac-test/src/app.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@nestjs/common'; 2 | 3 | @Injectable() 4 | export class AppService { 5 | getHello(): string { 6 | return 'Hello World!'; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /21_Nest_v3/rbac-test/src/bbb/bbb.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { BbbService } from './bbb.service'; 3 | import { BbbController } from './bbb.controller'; 4 | 5 | @Module({ 6 | controllers: [BbbController], 7 | providers: [BbbService] 8 | }) 9 | export class BbbModule {} 10 | -------------------------------------------------------------------------------- /21_Nest_v3/rbac-test/src/bbb/dto/create-bbb.dto.ts: -------------------------------------------------------------------------------- 1 | export class CreateBbbDto {} 2 | -------------------------------------------------------------------------------- /21_Nest_v3/rbac-test/src/bbb/dto/update-bbb.dto.ts: -------------------------------------------------------------------------------- 1 | import { PartialType } from '@nestjs/mapped-types'; 2 | import { CreateBbbDto } from './create-bbb.dto'; 3 | 4 | export class UpdateBbbDto extends PartialType(CreateBbbDto) {} 5 | -------------------------------------------------------------------------------- /21_Nest_v3/rbac-test/src/bbb/entities/bbb.entity.ts: -------------------------------------------------------------------------------- 1 | export class Bbb {} 2 | -------------------------------------------------------------------------------- /21_Nest_v3/rbac-test/src/custom-decorator.ts: -------------------------------------------------------------------------------- 1 | import { SetMetadata } from '@nestjs/common'; 2 | 3 | export const RequireLogin = () => SetMetadata('require-login', true); 4 | 5 | export const RequirePermission = (...permissions: string[]) => 6 | SetMetadata('require-permission', permissions); 7 | -------------------------------------------------------------------------------- /21_Nest_v3/rbac-test/src/user/dto/user.login.dto.ts: -------------------------------------------------------------------------------- 1 | import { IsNotEmpty, Length } from 'class-validator'; 2 | 3 | export class UserLoginDto { 4 | @IsNotEmpty() 5 | @Length(1, 50) 6 | username: string; 7 | 8 | @IsNotEmpty() 9 | @Length(1, 50) 10 | password: string; 11 | } 12 | -------------------------------------------------------------------------------- /21_Nest_v3/rbac-test/src/user/user.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { UserService } from './user.service'; 3 | import { UserController } from './user.controller'; 4 | 5 | @Module({ 6 | controllers: [UserController], 7 | providers: [UserService], 8 | exports: [UserService], 9 | }) 10 | export class UserModule {} 11 | -------------------------------------------------------------------------------- /21_Nest_v3/rbac-test/test/jest-e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "moduleFileExtensions": ["js", "json", "ts"], 3 | "rootDir": ".", 4 | "testEnvironment": "node", 5 | "testRegex": ".e2e-spec.ts$", 6 | "transform": { 7 | "^.+\\.(t|j)s$": "ts-jest" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /21_Nest_v3/rbac-test/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "exclude": ["node_modules", "test", "dist", "**/*spec.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /21_Nest_v3/redis-article-views/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "trailingComma": "all" 4 | } -------------------------------------------------------------------------------- /21_Nest_v3/redis-article-views/nest-cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/nest-cli", 3 | "collection": "@nestjs/schematics", 4 | "sourceRoot": "src", 5 | "compilerOptions": { 6 | "deleteOutDir": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /21_Nest_v3/redis-article-views/src/app.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@nestjs/common'; 2 | 3 | 4 | @Injectable() 5 | export class AppService { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /21_Nest_v3/redis-article-views/src/article/dto/create-article.dto.ts: -------------------------------------------------------------------------------- 1 | export class CreateArticleDto {} 2 | -------------------------------------------------------------------------------- /21_Nest_v3/redis-article-views/src/article/dto/update-article.dto.ts: -------------------------------------------------------------------------------- 1 | import { PartialType } from '@nestjs/mapped-types'; 2 | import { CreateArticleDto } from './create-article.dto'; 3 | 4 | export class UpdateArticleDto extends PartialType(CreateArticleDto) {} 5 | -------------------------------------------------------------------------------- /21_Nest_v3/redis-article-views/src/task/task.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { TasksService } from './task.service'; 3 | import { ArticleModule } from 'src/article/article.module'; 4 | 5 | @Module({ 6 | imports:[ArticleModule], 7 | providers: [TasksService], 8 | }) 9 | export class TaskModule {} 10 | -------------------------------------------------------------------------------- /21_Nest_v3/redis-article-views/src/user/dto/create-user.dto.ts: -------------------------------------------------------------------------------- 1 | export class CreateUserDto {} 2 | -------------------------------------------------------------------------------- /21_Nest_v3/redis-article-views/src/user/dto/login-user.dto.ts: -------------------------------------------------------------------------------- 1 | export class LoginUserDto { 2 | username: string; 3 | 4 | password: string; 5 | } 6 | -------------------------------------------------------------------------------- /21_Nest_v3/redis-article-views/src/user/dto/update-user.dto.ts: -------------------------------------------------------------------------------- 1 | import { PartialType } from '@nestjs/mapped-types'; 2 | import { CreateUserDto } from './create-user.dto'; 3 | 4 | export class UpdateUserDto extends PartialType(CreateUserDto) {} 5 | -------------------------------------------------------------------------------- /21_Nest_v3/redis-article-views/src/user/user.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { UserService } from './user.service'; 3 | import { UserController } from './user.controller'; 4 | 5 | @Module({ 6 | controllers: [UserController], 7 | providers: [UserService], 8 | }) 9 | export class UserModule {} 10 | -------------------------------------------------------------------------------- /21_Nest_v3/redis-article-views/test/jest-e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "moduleFileExtensions": ["js", "json", "ts"], 3 | "rootDir": ".", 4 | "testEnvironment": "node", 5 | "testRegex": ".e2e-spec.ts$", 6 | "transform": { 7 | "^.+\\.(t|j)s$": "ts-jest" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /21_Nest_v3/redis-article-views/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "exclude": ["node_modules", "test", "dist", "**/*spec.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /21_Nest_v3/redis-nearby-search/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "trailingComma": "all" 4 | } -------------------------------------------------------------------------------- /21_Nest_v3/redis-nearby-search/nest-cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/nest-cli", 3 | "collection": "@nestjs/schematics", 4 | "sourceRoot": "src", 5 | "compilerOptions": { 6 | "deleteOutDir": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /21_Nest_v3/redis-nearby-search/src/app.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@nestjs/common'; 2 | 3 | @Injectable() 4 | export class AppService { 5 | getHello(): string { 6 | return 'Hello World!'; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /21_Nest_v3/redis-nearby-search/src/main.ts: -------------------------------------------------------------------------------- 1 | import { NestFactory } from '@nestjs/core'; 2 | import { AppModule } from './app.module'; 3 | 4 | async function bootstrap() { 5 | const app = await NestFactory.create(AppModule); 6 | await app.listen(3000); 7 | } 8 | bootstrap(); 9 | -------------------------------------------------------------------------------- /21_Nest_v3/redis-nearby-search/test/jest-e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "moduleFileExtensions": ["js", "json", "ts"], 3 | "rootDir": ".", 4 | "testEnvironment": "node", 5 | "testRegex": ".e2e-spec.ts$", 6 | "transform": { 7 | "^.+\\.(t|j)s$": "ts-jest" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /21_Nest_v3/redis-nearby-search/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "exclude": ["node_modules", "test", "dist", "**/*spec.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /21_Nest_v3/redis-node-test/ioredis.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: thunderchen 3 | * @Date: 2023-07-29 17:41:27 4 | * @LastEditTime: 2023-07-29 17:41:30 5 | * @email: 853524319@qq.com 6 | * @Description: ioredis 7 | */ 8 | 9 | import Redis from "ioredis" 10 | 11 | const redis = new Redis() 12 | 13 | const res = await redis.keys("*") 14 | 15 | console.log(res); -------------------------------------------------------------------------------- /21_Nest_v3/redis-session-test/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "trailingComma": "all" 4 | } -------------------------------------------------------------------------------- /21_Nest_v3/redis-session-test/nest-cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/nest-cli", 3 | "collection": "@nestjs/schematics", 4 | "sourceRoot": "src", 5 | "compilerOptions": { 6 | "deleteOutDir": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /21_Nest_v3/redis-session-test/src/app.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@nestjs/common'; 2 | 3 | @Injectable() 4 | export class AppService { 5 | getHello(): string { 6 | return 'Hello World!'; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /21_Nest_v3/redis-session-test/src/session/session.module.ts: -------------------------------------------------------------------------------- 1 | import { Global, Module } from '@nestjs/common'; 2 | import { SessionService } from './session.service'; 3 | 4 | @Global() 5 | @Module({ 6 | providers: [SessionService], 7 | exports: [SessionService], 8 | }) 9 | export class SessionModule {} 10 | -------------------------------------------------------------------------------- /21_Nest_v3/redis-session-test/test/jest-e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "moduleFileExtensions": ["js", "json", "ts"], 3 | "rootDir": ".", 4 | "testEnvironment": "node", 5 | "testRegex": ".e2e-spec.ts$", 6 | "transform": { 7 | "^.+\\.(t|j)s$": "ts-jest" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /21_Nest_v3/redis-session-test/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "exclude": ["node_modules", "test", "dist", "**/*spec.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /21_Nest_v3/refresh_token_test/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/21_Nest_v3/refresh_token_test/public/favicon.ico -------------------------------------------------------------------------------- /21_Nest_v3/refresh_token_test/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/21_Nest_v3/refresh_token_test/public/logo192.png -------------------------------------------------------------------------------- /21_Nest_v3/refresh_token_test/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/21_Nest_v3/refresh_token_test/public/logo512.png -------------------------------------------------------------------------------- /21_Nest_v3/refresh_token_test/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /21_Nest_v3/refresh_token_test/src/App.test.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { render, screen } from '@testing-library/react'; 3 | import App from './App'; 4 | 5 | test('renders learn react link', () => { 6 | render(); 7 | const linkElement = screen.getByText(/learn react/i); 8 | expect(linkElement).toBeInTheDocument(); 9 | }); 10 | -------------------------------------------------------------------------------- /21_Nest_v3/refresh_token_test/src/react-app-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /21_Nest_v3/refresh_token_test/src/setupTests.ts: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom'; 6 | -------------------------------------------------------------------------------- /21_Nest_v3/repl-test/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "trailingComma": "all" 4 | } -------------------------------------------------------------------------------- /21_Nest_v3/repl-test/nest-cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/nest-cli", 3 | "collection": "@nestjs/schematics", 4 | "sourceRoot": "src", 5 | "compilerOptions": { 6 | "deleteOutDir": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /21_Nest_v3/repl-test/src/aaa/aaa.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { AaaService } from './aaa.service'; 3 | import { AaaController } from './aaa.controller'; 4 | 5 | @Module({ 6 | controllers: [AaaController], 7 | providers: [AaaService] 8 | }) 9 | export class AaaModule {} 10 | -------------------------------------------------------------------------------- /21_Nest_v3/repl-test/src/aaa/dto/create-aaa.dto.ts: -------------------------------------------------------------------------------- 1 | import { IsEmail, IsNotEmpty } from 'class-validator'; 2 | 3 | export class CreateAaaDto { 4 | @IsNotEmpty() 5 | aaa: string; 6 | 7 | @IsEmail() 8 | bbb: string; 9 | } 10 | -------------------------------------------------------------------------------- /21_Nest_v3/repl-test/src/aaa/dto/update-aaa.dto.ts: -------------------------------------------------------------------------------- 1 | import { PartialType } from '@nestjs/mapped-types'; 2 | import { CreateAaaDto } from './create-aaa.dto'; 3 | 4 | export class UpdateAaaDto extends PartialType(CreateAaaDto) {} 5 | -------------------------------------------------------------------------------- /21_Nest_v3/repl-test/src/aaa/entities/aaa.entity.ts: -------------------------------------------------------------------------------- 1 | export class Aaa {} 2 | -------------------------------------------------------------------------------- /21_Nest_v3/repl-test/src/app.controller.ts: -------------------------------------------------------------------------------- 1 | import { Controller, Get } from '@nestjs/common'; 2 | import { AppService } from './app.service'; 3 | 4 | @Controller() 5 | export class AppController { 6 | constructor(private readonly appService: AppService) {} 7 | 8 | @Get() 9 | getHello(): string { 10 | return this.appService.getHello(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /21_Nest_v3/repl-test/src/app.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@nestjs/common'; 2 | 3 | @Injectable() 4 | export class AppService { 5 | getHello(): string { 6 | return 'Hello World!'; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /21_Nest_v3/repl-test/src/bbb/bbb.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { BbbService } from './bbb.service'; 3 | import { BbbController } from './bbb.controller'; 4 | 5 | @Module({ 6 | controllers: [BbbController], 7 | providers: [BbbService] 8 | }) 9 | export class BbbModule {} 10 | -------------------------------------------------------------------------------- /21_Nest_v3/repl-test/src/bbb/dto/create-bbb.dto.ts: -------------------------------------------------------------------------------- 1 | export class CreateBbbDto {} 2 | -------------------------------------------------------------------------------- /21_Nest_v3/repl-test/src/bbb/dto/update-bbb.dto.ts: -------------------------------------------------------------------------------- 1 | import { PartialType } from '@nestjs/mapped-types'; 2 | import { CreateBbbDto } from './create-bbb.dto'; 3 | 4 | export class UpdateBbbDto extends PartialType(CreateBbbDto) {} 5 | -------------------------------------------------------------------------------- /21_Nest_v3/repl-test/src/bbb/entities/bbb.entity.ts: -------------------------------------------------------------------------------- 1 | export class Bbb {} 2 | -------------------------------------------------------------------------------- /21_Nest_v3/repl-test/src/repl.ts: -------------------------------------------------------------------------------- 1 | import { repl } from '@nestjs/core'; 2 | import { AppModule } from './app.module'; 3 | 4 | async function bootstrap() { 5 | await repl(AppModule); 6 | } 7 | bootstrap(); 8 | -------------------------------------------------------------------------------- /21_Nest_v3/repl-test/test/jest-e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "moduleFileExtensions": ["js", "json", "ts"], 3 | "rootDir": ".", 4 | "testEnvironment": "node", 5 | "testRegex": ".e2e-spec.ts$", 6 | "transform": { 7 | "^.+\\.(t|j)s$": "ts-jest" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /21_Nest_v3/repl-test/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "exclude": ["node_modules", "test", "dist", "**/*spec.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /21_Nest_v3/schedule-task/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "trailingComma": "all" 4 | } -------------------------------------------------------------------------------- /21_Nest_v3/schedule-task/nest-cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/nest-cli", 3 | "collection": "@nestjs/schematics", 4 | "sourceRoot": "src", 5 | "compilerOptions": { 6 | "deleteOutDir": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /21_Nest_v3/schedule-task/src/aaa/aaa.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { AaaService } from './aaa.service'; 3 | import { AaaController } from './aaa.controller'; 4 | 5 | @Module({ 6 | controllers: [AaaController], 7 | providers: [AaaService], 8 | exports: [AaaService], 9 | }) 10 | export class AaaModule {} 11 | -------------------------------------------------------------------------------- /21_Nest_v3/schedule-task/src/aaa/dto/create-aaa.dto.ts: -------------------------------------------------------------------------------- 1 | export class CreateAaaDto {} 2 | -------------------------------------------------------------------------------- /21_Nest_v3/schedule-task/src/aaa/dto/update-aaa.dto.ts: -------------------------------------------------------------------------------- 1 | import { PartialType } from '@nestjs/mapped-types'; 2 | import { CreateAaaDto } from './create-aaa.dto'; 3 | 4 | export class UpdateAaaDto extends PartialType(CreateAaaDto) {} 5 | -------------------------------------------------------------------------------- /21_Nest_v3/schedule-task/src/aaa/entities/aaa.entity.ts: -------------------------------------------------------------------------------- 1 | export class Aaa {} 2 | -------------------------------------------------------------------------------- /21_Nest_v3/schedule-task/src/app.controller.ts: -------------------------------------------------------------------------------- 1 | import { Controller, Get } from '@nestjs/common'; 2 | import { AppService } from './app.service'; 3 | 4 | @Controller() 5 | export class AppController { 6 | constructor(private readonly appService: AppService) {} 7 | 8 | @Get() 9 | getHello(): string { 10 | return this.appService.getHello(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /21_Nest_v3/schedule-task/src/app.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@nestjs/common'; 2 | 3 | @Injectable() 4 | export class AppService { 5 | getHello(): string { 6 | return 'Hello World!'; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /21_Nest_v3/schedule-task/src/main.ts: -------------------------------------------------------------------------------- 1 | import { NestFactory } from '@nestjs/core'; 2 | import { AppModule } from './app.module'; 3 | 4 | async function bootstrap() { 5 | const app = await NestFactory.create(AppModule); 6 | await app.listen(3000); 7 | } 8 | bootstrap(); 9 | -------------------------------------------------------------------------------- /21_Nest_v3/schedule-task/test/jest-e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "moduleFileExtensions": ["js", "json", "ts"], 3 | "rootDir": ".", 4 | "testEnvironment": "node", 5 | "testRegex": ".e2e-spec.ts$", 6 | "transform": { 7 | "^.+\\.(t|j)s$": "ts-jest" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /21_Nest_v3/schedule-task/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "exclude": ["node_modules", "test", "dist", "**/*spec.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /21_Nest_v3/sse-test-frontend/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/21_Nest_v3/sse-test-frontend/public/favicon.ico -------------------------------------------------------------------------------- /21_Nest_v3/sse-test-frontend/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/21_Nest_v3/sse-test-frontend/public/logo192.png -------------------------------------------------------------------------------- /21_Nest_v3/sse-test-frontend/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/21_Nest_v3/sse-test-frontend/public/logo512.png -------------------------------------------------------------------------------- /21_Nest_v3/sse-test-frontend/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /21_Nest_v3/sse-test-frontend/src/App.test.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { render, screen } from '@testing-library/react'; 3 | import App from './App'; 4 | 5 | test('renders learn react link', () => { 6 | render(); 7 | const linkElement = screen.getByText(/learn react/i); 8 | expect(linkElement).toBeInTheDocument(); 9 | }); 10 | -------------------------------------------------------------------------------- /21_Nest_v3/sse-test-frontend/src/react-app-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /21_Nest_v3/sse-test-frontend/src/setupTests.ts: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom'; 6 | -------------------------------------------------------------------------------- /21_Nest_v3/sse-test/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "trailingComma": "all" 4 | } -------------------------------------------------------------------------------- /21_Nest_v3/sse-test/nest-cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/nest-cli", 3 | "collection": "@nestjs/schematics", 4 | "sourceRoot": "src", 5 | "compilerOptions": { 6 | "deleteOutDir": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /21_Nest_v3/sse-test/src/app.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { AppController } from './app.controller'; 3 | import { AppService } from './app.service'; 4 | 5 | @Module({ 6 | imports: [], 7 | controllers: [AppController], 8 | providers: [AppService], 9 | }) 10 | export class AppModule {} 11 | -------------------------------------------------------------------------------- /21_Nest_v3/sse-test/src/app.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@nestjs/common'; 2 | 3 | @Injectable() 4 | export class AppService { 5 | getHello(): string { 6 | return 'Hello World!'; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /21_Nest_v3/sse-test/src/main.ts: -------------------------------------------------------------------------------- 1 | import { NestFactory } from '@nestjs/core'; 2 | import { AppModule } from './app.module'; 3 | 4 | async function bootstrap() { 5 | const app = await NestFactory.create(AppModule); 6 | //允许跨域 7 | app.enableCors(); 8 | await app.listen(3000); 9 | } 10 | bootstrap(); 11 | -------------------------------------------------------------------------------- /21_Nest_v3/sse-test/test/jest-e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "moduleFileExtensions": ["js", "json", "ts"], 3 | "rootDir": ".", 4 | "testEnvironment": "node", 5 | "testRegex": ".e2e-spec.ts$", 6 | "transform": { 7 | "^.+\\.(t|j)s$": "ts-jest" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /21_Nest_v3/sse-test/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "exclude": ["node_modules", "test", "dist", "**/*spec.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /21_Nest_v3/swagger-test/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "trailingComma": "all" 4 | } -------------------------------------------------------------------------------- /21_Nest_v3/swagger-test/nest-cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/nest-cli", 3 | "collection": "@nestjs/schematics", 4 | "sourceRoot": "src", 5 | "compilerOptions": { 6 | "deleteOutDir": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /21_Nest_v3/swagger-test/src/app.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { AppController } from './app.controller'; 3 | import { AppService } from './app.service'; 4 | 5 | @Module({ 6 | imports: [], 7 | controllers: [AppController], 8 | providers: [AppService], 9 | }) 10 | export class AppModule {} 11 | -------------------------------------------------------------------------------- /21_Nest_v3/swagger-test/src/app.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@nestjs/common'; 2 | 3 | @Injectable() 4 | export class AppService { 5 | getHello(): string { 6 | return 'Hello World!'; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /21_Nest_v3/swagger-test/src/ccc.vo.ts: -------------------------------------------------------------------------------- 1 | import { ApiProperty } from '@nestjs/swagger'; 2 | 3 | export class CccVo { 4 | @ApiProperty({ name: 'aaa' }) 5 | aaa: number; 6 | 7 | @ApiProperty({ name: 'bbb' }) 8 | bbb: number; 9 | } 10 | -------------------------------------------------------------------------------- /21_Nest_v3/swagger-test/test/jest-e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "moduleFileExtensions": ["js", "json", "ts"], 3 | "rootDir": ".", 4 | "testEnvironment": "node", 5 | "testRegex": ".e2e-spec.ts$", 6 | "transform": { 7 | "^.+\\.(t|j)s$": "ts-jest" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /21_Nest_v3/swagger-test/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "exclude": ["node_modules", "test", "dist", "**/*spec.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /21_Nest_v3/testDebug.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: thunderchen 3 | * @Date: 2023-06-28 22:05:16 4 | * @LastEditTime: 2023-06-28 22:47:29 5 | * @email: 853524319@qq.com 6 | * @Description: debuger 7 | */ 8 | 9 | 10 | const os = require('os') 11 | const homedir = os.homedir() 12 | console.log(homedir); -------------------------------------------------------------------------------- /21_Nest_v3/typeorm/typeorm-all-feature/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .vscode/ 3 | node_modules/ 4 | build/ 5 | tmp/ 6 | temp/ -------------------------------------------------------------------------------- /21_Nest_v3/typeorm/typeorm-all-feature/README.md: -------------------------------------------------------------------------------- 1 | # Awesome Project Build with TypeORM 2 | 3 | Steps to run this project: 4 | 5 | 1. Run `npm i` command 6 | 2. Setup database settings inside `data-source.ts` file 7 | 3. Run `npm start` command 8 | -------------------------------------------------------------------------------- /21_Nest_v3/typeorm/typeorm-mysql-test/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .vscode/ 3 | node_modules/ 4 | build/ 5 | tmp/ 6 | temp/ -------------------------------------------------------------------------------- /21_Nest_v3/typeorm/typeorm-mysql-test/README.md: -------------------------------------------------------------------------------- 1 | # Awesome Project Build with TypeORM 2 | 3 | Steps to run this project: 4 | 5 | 1. Run `npm i` command 6 | 2. Setup database settings inside `data-source.ts` file 7 | 3. Run `npm start` command 8 | -------------------------------------------------------------------------------- /21_Nest_v3/typeorm/typeorm-relation-mapping/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .vscode/ 3 | node_modules/ 4 | build/ 5 | tmp/ 6 | temp/ -------------------------------------------------------------------------------- /21_Nest_v3/typeorm/typeorm-relation-mapping/README.md: -------------------------------------------------------------------------------- 1 | # Awesome Project Build with TypeORM 2 | 3 | Steps to run this project: 4 | 5 | 1. Run `npm i` command 6 | 2. Setup database settings inside `data-source.ts` file 7 | 3. Run `npm start` command 8 | -------------------------------------------------------------------------------- /21_Nest_v3/typeorm/typeorm-relation-mapping2/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .vscode/ 3 | node_modules/ 4 | build/ 5 | tmp/ 6 | temp/ -------------------------------------------------------------------------------- /21_Nest_v3/typeorm/typeorm-relation-mapping2/README.md: -------------------------------------------------------------------------------- 1 | # Awesome Project Build with TypeORM 2 | 3 | Steps to run this project: 4 | 5 | 1. Run `npm i` command 6 | 2. Setup database settings inside `data-source.ts` file 7 | 3. Run `npm start` command 8 | -------------------------------------------------------------------------------- /21_Nest_v3/typeorm/typeorm-relation-mapping3/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .vscode/ 3 | node_modules/ 4 | build/ 5 | tmp/ 6 | temp/ -------------------------------------------------------------------------------- /21_Nest_v3/typeorm/typeorm-relation-mapping3/README.md: -------------------------------------------------------------------------------- 1 | # Awesome Project Build with TypeORM 2 | 3 | Steps to run this project: 4 | 5 | 1. Run `npm i` command 6 | 2. Setup database settings inside `data-source.ts` file 7 | 3. Run `npm start` command 8 | -------------------------------------------------------------------------------- /21_Nest_v3/winston-log-server/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "trailingComma": "all" 4 | } -------------------------------------------------------------------------------- /21_Nest_v3/winston-log-server/nest-cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/nest-cli", 3 | "collection": "@nestjs/schematics", 4 | "sourceRoot": "src", 5 | "compilerOptions": { 6 | "deleteOutDir": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /21_Nest_v3/winston-log-server/src/app.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { AppController } from './app.controller'; 3 | import { AppService } from './app.service'; 4 | 5 | @Module({ 6 | imports: [], 7 | controllers: [AppController], 8 | providers: [AppService], 9 | }) 10 | export class AppModule {} 11 | -------------------------------------------------------------------------------- /21_Nest_v3/winston-log-server/src/app.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@nestjs/common'; 2 | 3 | @Injectable() 4 | export class AppService { 5 | getHello(): string { 6 | return 'Hello World!'; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /21_Nest_v3/winston-log-server/src/main.ts: -------------------------------------------------------------------------------- 1 | import { NestFactory } from '@nestjs/core'; 2 | import { AppModule } from './app.module'; 3 | 4 | async function bootstrap() { 5 | const app = await NestFactory.create(AppModule); 6 | await app.listen(3000); 7 | } 8 | bootstrap(); 9 | -------------------------------------------------------------------------------- /21_Nest_v3/winston-log-server/test/jest-e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "moduleFileExtensions": ["js", "json", "ts"], 3 | "rootDir": ".", 4 | "testEnvironment": "node", 5 | "testRegex": ".e2e-spec.ts$", 6 | "transform": { 7 | "^.+\\.(t|j)s$": "ts-jest" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /21_Nest_v3/winston-log-server/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "exclude": ["node_modules", "test", "dist", "**/*spec.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /22_meeting_room_project/meeting_room_booking_system_backend/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "trailingComma": "all" 4 | } -------------------------------------------------------------------------------- /22_meeting_room_project/meeting_room_booking_system_backend/doc/LoginGuard.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/22_meeting_room_project/meeting_room_booking_system_backend/doc/LoginGuard.jpg -------------------------------------------------------------------------------- /22_meeting_room_project/meeting_room_booking_system_backend/doc/apis.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/22_meeting_room_project/meeting_room_booking_system_backend/doc/apis.jpg -------------------------------------------------------------------------------- /22_meeting_room_project/meeting_room_booking_system_backend/doc/database/meeting_rooms.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/22_meeting_room_project/meeting_room_booking_system_backend/doc/database/meeting_rooms.jpg -------------------------------------------------------------------------------- /22_meeting_room_project/meeting_room_booking_system_backend/doc/database/user.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/22_meeting_room_project/meeting_room_booking_system_backend/doc/database/user.jpg -------------------------------------------------------------------------------- /22_meeting_room_project/meeting_room_booking_system_backend/doc/database/权限表permissions.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/22_meeting_room_project/meeting_room_booking_system_backend/doc/database/权限表permissions.jpg -------------------------------------------------------------------------------- /22_meeting_room_project/meeting_room_booking_system_backend/doc/database/用户,预订-参会人,预定表,会议室表关系.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/22_meeting_room_project/meeting_room_booking_system_backend/doc/database/用户,预订-参会人,预定表,会议室表关系.jpg -------------------------------------------------------------------------------- /22_meeting_room_project/meeting_room_booking_system_backend/doc/database/用户-角色中间表-user_roles.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/22_meeting_room_project/meeting_room_booking_system_backend/doc/database/用户-角色中间表-user_roles.jpg -------------------------------------------------------------------------------- /22_meeting_room_project/meeting_room_booking_system_backend/doc/database/角色-权限中间表-role_permissions.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/22_meeting_room_project/meeting_room_booking_system_backend/doc/database/角色-权限中间表-role_permissions.jpg -------------------------------------------------------------------------------- /22_meeting_room_project/meeting_room_booking_system_backend/doc/database/角色相关表关系.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/22_meeting_room_project/meeting_room_booking_system_backend/doc/database/角色相关表关系.jpg -------------------------------------------------------------------------------- /22_meeting_room_project/meeting_room_booking_system_backend/doc/database/角色表.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/22_meeting_room_project/meeting_room_booking_system_backend/doc/database/角色表.jpg -------------------------------------------------------------------------------- /22_meeting_room_project/meeting_room_booking_system_backend/doc/database/预定表_bookings.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/22_meeting_room_project/meeting_room_booking_system_backend/doc/database/预定表_bookings.jpg -------------------------------------------------------------------------------- /22_meeting_room_project/meeting_room_booking_system_backend/doc/database/预订-参会人表booking_attendees.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/22_meeting_room_project/meeting_room_booking_system_backend/doc/database/预订-参会人表booking_attendees.jpg -------------------------------------------------------------------------------- /22_meeting_room_project/meeting_room_booking_system_backend/doc/requirementAnalysis.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/22_meeting_room_project/meeting_room_booking_system_backend/doc/requirementAnalysis.jpg -------------------------------------------------------------------------------- /22_meeting_room_project/meeting_room_booking_system_backend/doc/technologyStack.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/22_meeting_room_project/meeting_room_booking_system_backend/doc/technologyStack.jpg -------------------------------------------------------------------------------- /22_meeting_room_project/meeting_room_booking_system_backend/src/app.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@nestjs/common'; 2 | 3 | @Injectable() 4 | export class AppService { 5 | getHello(): string { 6 | return 'Hello World!'; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /22_meeting_room_project/meeting_room_booking_system_backend/src/email/email.controller.ts: -------------------------------------------------------------------------------- 1 | import { Controller } from '@nestjs/common'; 2 | import { EmailService } from './email.service'; 3 | 4 | @Controller('email') 5 | export class EmailController { 6 | constructor(private readonly emailService: EmailService) {} 7 | } 8 | -------------------------------------------------------------------------------- /22_meeting_room_project/meeting_room_booking_system_backend/src/user/vo/README.md: -------------------------------------------------------------------------------- 1 | ### dto 是接收参数的,vo 是封装返回的数据的,entity 是和数据库表对应的。 2 | 3 | 4 | -------------------------------------------------------------------------------- /22_meeting_room_project/meeting_room_booking_system_backend/src/user/vo/refresh-token.vo.ts: -------------------------------------------------------------------------------- 1 | import { ApiProperty } from '@nestjs/swagger'; 2 | 3 | export class RefreshTokenVo { 4 | @ApiProperty() 5 | access_token: string; 6 | 7 | @ApiProperty() 8 | refresh_token: string; 9 | } 10 | -------------------------------------------------------------------------------- /22_meeting_room_project/meeting_room_booking_system_backend/test/jest-e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "moduleFileExtensions": ["js", "json", "ts"], 3 | "rootDir": ".", 4 | "testEnvironment": "node", 5 | "testRegex": ".e2e-spec.ts$", 6 | "transform": { 7 | "^.+\\.(t|j)s$": "ts-jest" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /22_meeting_room_project/meeting_room_booking_system_backend/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "exclude": ["node_modules", "test", "dist", "**/*spec.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /22_meeting_room_project/meeting_room_booking_system_frontend_user/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/22_meeting_room_project/meeting_room_booking_system_frontend_user/public/favicon.ico -------------------------------------------------------------------------------- /22_meeting_room_project/meeting_room_booking_system_frontend_user/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/22_meeting_room_project/meeting_room_booking_system_frontend_user/public/logo192.png -------------------------------------------------------------------------------- /22_meeting_room_project/meeting_room_booking_system_frontend_user/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/22_meeting_room_project/meeting_room_booking_system_frontend_user/public/logo512.png -------------------------------------------------------------------------------- /22_meeting_room_project/meeting_room_booking_system_frontend_user/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /22_meeting_room_project/meeting_room_booking_system_frontend_user/src/react-app-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /22_meeting_room_project/meeting_room_booking_system_frontend_user/src/setupTests.ts: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom'; 6 | -------------------------------------------------------------------------------- /22_meeting_room_project/meeting_room_booking_system_frontend_user/src/style/Login.css: -------------------------------------------------------------------------------- 1 | #login-container { 2 | width: 400px; 3 | margin: 100px auto 0 auto; 4 | text-align: center; 5 | } 6 | #login-container .links { 7 | display: flex; 8 | justify-content: space-between; 9 | } 10 | #login-container .btn { 11 | width: 100%; 12 | } 13 | -------------------------------------------------------------------------------- /22_meeting_room_project/meeting_room_booking_system_frontend_user/src/views/Aaa.tsx: -------------------------------------------------------------------------------- 1 | 2 | export default function Aaa() { 3 | return
aaa
4 | } -------------------------------------------------------------------------------- /22_meeting_room_project/meeting_room_booking_system_frontend_user/src/views/Bbb.tsx: -------------------------------------------------------------------------------- 1 | 2 | export default function Bbb() { 3 | return
bbb
4 | } -------------------------------------------------------------------------------- /22_meeting_room_project/meeting_room_booking_system_frontend_user/src/views/ErrorPage.tsx: -------------------------------------------------------------------------------- 1 | export default function ErrorPage() { 2 | return
error
; 3 | } -------------------------------------------------------------------------------- /22_meeting_room_project/meeting_room_booking_system_frontend_user/src/views/Layout.tsx: -------------------------------------------------------------------------------- 1 | import { Link } from "react-router-dom" 2 | 3 | export default function Layout() { 4 | return
5 |
6 | to Aaa 7 | to Bbb 8 |
9 |
10 | } -------------------------------------------------------------------------------- /23_large-file-sharding-upload/README.md: -------------------------------------------------------------------------------- 1 | NestJS - Large file sharding upload -------------------------------------------------------------------------------- /commitlint.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: ['@commitlint/config-conventional'] 3 | } 4 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Document 7 | 8 | 9 | docker test 10 | 11 | -------------------------------------------------------------------------------- /vod-upload-demo/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | [ 4 | "@babel/preset-env", 5 | { 6 | "useBuiltIns": "entry" 7 | } 8 | ] 9 | ] 10 | } -------------------------------------------------------------------------------- /vod-upload-demo/README.md: -------------------------------------------------------------------------------- 1 | ## 阿里云视频云web上传demo 2 | 3 | ### 启动项目 4 | 5 | ```sh 6 | npm run dev 7 | ``` 8 | 9 | ### 项目打包 10 | 11 | ```sh 12 | npm run build 13 | ``` 14 | 15 | 打包之后将 lib 目录拷贝到 dist 目录下 -------------------------------------------------------------------------------- /vod-upload-demo/lib/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/vod-upload-demo/lib/.DS_Store -------------------------------------------------------------------------------- /vod-upload-demo/lib/aliyun-upload-sdk/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder7991/Node-DevelopmentPlan/675cc495aaa163dfbb45fdd46e3af9b0c3457a7e/vod-upload-demo/lib/aliyun-upload-sdk/.DS_Store --------------------------------------------------------------------------------