nodejs-quickstart-structure 1.4.3 → 1.7.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/CHANGELOG.md +78 -0
  2. package/README.md +18 -20
  3. package/bin/index.js +1 -0
  4. package/docs/generateCase.md +127 -61
  5. package/docs/generatorFlow.md +15 -3
  6. package/docs/releaseNoteRule.md +42 -0
  7. package/lib/generator.js +46 -314
  8. package/lib/modules/app-setup.js +96 -0
  9. package/lib/modules/caching-setup.js +56 -0
  10. package/lib/modules/config-files.js +109 -0
  11. package/lib/modules/database-setup.js +111 -0
  12. package/lib/modules/kafka-setup.js +112 -0
  13. package/lib/modules/project-setup.js +31 -0
  14. package/lib/prompts.js +12 -4
  15. package/package.json +4 -3
  16. package/templates/clean-architecture/js/src/index.js.ejs +19 -6
  17. package/templates/clean-architecture/js/src/infrastructure/log/logger.js +16 -2
  18. package/templates/clean-architecture/js/src/infrastructure/repositories/UserRepository.js.ejs +18 -6
  19. package/templates/clean-architecture/js/src/infrastructure/webserver/server.js.ejs +2 -0
  20. package/templates/clean-architecture/ts/src/config/swagger.ts.ejs +1 -2
  21. package/templates/clean-architecture/ts/src/index.ts.ejs +27 -19
  22. package/templates/clean-architecture/ts/src/infrastructure/log/logger.ts +16 -2
  23. package/templates/clean-architecture/ts/src/infrastructure/repositories/userRepository.ts.ejs +17 -6
  24. package/templates/common/.env.example.ejs +39 -0
  25. package/templates/common/Dockerfile +3 -0
  26. package/templates/common/Jenkinsfile.ejs +41 -0
  27. package/templates/common/README.md.ejs +113 -106
  28. package/templates/common/caching/clean/js/CreateUser.js.ejs +25 -0
  29. package/templates/common/caching/clean/js/GetAllUsers.js.ejs +33 -0
  30. package/templates/common/caching/clean/ts/createUser.ts.ejs +23 -0
  31. package/templates/common/caching/clean/ts/getAllUsers.ts.ejs +30 -0
  32. package/templates/common/caching/js/redisClient.js.ejs +71 -0
  33. package/templates/common/caching/ts/redisClient.ts.ejs +76 -0
  34. package/templates/common/docker-compose.yml.ejs +156 -116
  35. package/templates/common/package.json.ejs +13 -2
  36. package/templates/mvc/js/src/controllers/userController.js.ejs +35 -3
  37. package/templates/mvc/js/src/index.js.ejs +26 -17
  38. package/templates/mvc/js/src/utils/logger.js +16 -6
  39. package/templates/mvc/ts/src/config/swagger.ts.ejs +1 -2
  40. package/templates/mvc/ts/src/controllers/userController.ts.ejs +35 -3
  41. package/templates/mvc/ts/src/index.ts.ejs +27 -18
  42. package/templates/mvc/ts/src/utils/logger.ts +16 -2
  43. package/templates/mvc/js/src/config/database.js +0 -12
  44. /package/templates/db/mysql/{V1__Initial_Setup.sql → V1__Initial_Setup.sql.ejs} +0 -0
  45. /package/templates/db/postgres/{V1__Initial_Setup.sql → V1__Initial_Setup.sql.ejs} +0 -0
@@ -1,12 +0,0 @@
1
- // Database configuration placeholder
2
- // Use environment variables from .env depending on your DB choice (MySQL/Postgres)
3
- require('dotenv').config();
4
-
5
- const dbConfig = {
6
- host: process.env.DB_HOST,
7
- user: process.env.DB_USER,
8
- password: process.env.DB_PASSWORD,
9
- database: process.env.DB_NAME
10
- };
11
-
12
- module.exports = dbConfig;