├── .eslintrc.cjs ├── .gitattributes ├── .gitignore ├── .husky └── pre-commit ├── .npmrc ├── .prettierrc.cjs ├── .vscode ├── extensions.json └── launch.json ├── .yarnrc ├── Dockerfile ├── LICENSE ├── README.md ├── app.js ├── config ├── default.json ├── development.json └── production.json ├── package.json ├── src ├── controller │ ├── authController.js │ └── userController.js ├── dao │ ├── authDao.js │ └── userDao.js ├── middleware │ ├── apiProtected.js │ ├── errorHandler.js │ └── responseFormat.js ├── service │ ├── authService.js │ └── userService.js └── utils │ └── dbConnPool │ ├── db.js │ ├── mariadb.js │ └── sqlite.js └── test └── user.http /.eslintrc.cjs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdmuna/nodejs-express-demo/HEAD/.eslintrc.cjs -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdmuna/nodejs-express-demo/HEAD/.gitattributes -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdmuna/nodejs-express-demo/HEAD/.gitignore -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 在 git commit 之前,针对 git add 的文件进行渐进式重构 4 | npx lint-staged 5 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdmuna/nodejs-express-demo/HEAD/.npmrc -------------------------------------------------------------------------------- /.prettierrc.cjs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdmuna/nodejs-express-demo/HEAD/.prettierrc.cjs -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdmuna/nodejs-express-demo/HEAD/.vscode/extensions.json -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdmuna/nodejs-express-demo/HEAD/.vscode/launch.json -------------------------------------------------------------------------------- /.yarnrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdmuna/nodejs-express-demo/HEAD/.yarnrc -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdmuna/nodejs-express-demo/HEAD/Dockerfile -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdmuna/nodejs-express-demo/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdmuna/nodejs-express-demo/HEAD/README.md -------------------------------------------------------------------------------- /app.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdmuna/nodejs-express-demo/HEAD/app.js -------------------------------------------------------------------------------- /config/default.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdmuna/nodejs-express-demo/HEAD/config/default.json -------------------------------------------------------------------------------- /config/development.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdmuna/nodejs-express-demo/HEAD/config/development.json -------------------------------------------------------------------------------- /config/production.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdmuna/nodejs-express-demo/HEAD/config/production.json -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdmuna/nodejs-express-demo/HEAD/package.json -------------------------------------------------------------------------------- /src/controller/authController.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdmuna/nodejs-express-demo/HEAD/src/controller/authController.js -------------------------------------------------------------------------------- /src/controller/userController.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdmuna/nodejs-express-demo/HEAD/src/controller/userController.js -------------------------------------------------------------------------------- /src/dao/authDao.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdmuna/nodejs-express-demo/HEAD/src/dao/authDao.js -------------------------------------------------------------------------------- /src/dao/userDao.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdmuna/nodejs-express-demo/HEAD/src/dao/userDao.js -------------------------------------------------------------------------------- /src/middleware/apiProtected.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdmuna/nodejs-express-demo/HEAD/src/middleware/apiProtected.js -------------------------------------------------------------------------------- /src/middleware/errorHandler.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdmuna/nodejs-express-demo/HEAD/src/middleware/errorHandler.js -------------------------------------------------------------------------------- /src/middleware/responseFormat.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdmuna/nodejs-express-demo/HEAD/src/middleware/responseFormat.js -------------------------------------------------------------------------------- /src/service/authService.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdmuna/nodejs-express-demo/HEAD/src/service/authService.js -------------------------------------------------------------------------------- /src/service/userService.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdmuna/nodejs-express-demo/HEAD/src/service/userService.js -------------------------------------------------------------------------------- /src/utils/dbConnPool/db.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdmuna/nodejs-express-demo/HEAD/src/utils/dbConnPool/db.js -------------------------------------------------------------------------------- /src/utils/dbConnPool/mariadb.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdmuna/nodejs-express-demo/HEAD/src/utils/dbConnPool/mariadb.js -------------------------------------------------------------------------------- /src/utils/dbConnPool/sqlite.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdmuna/nodejs-express-demo/HEAD/src/utils/dbConnPool/sqlite.js -------------------------------------------------------------------------------- /test/user.http: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdmuna/nodejs-express-demo/HEAD/test/user.http --------------------------------------------------------------------------------