express-genix 1.1.4 → 2.0.0

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 (66) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +204 -259
  3. package/index.js +229 -113
  4. package/lib/cleanup.js +41 -129
  5. package/lib/features.js +239 -0
  6. package/lib/generator.js +286 -204
  7. package/lib/utils.js +43 -91
  8. package/package.json +81 -63
  9. package/templates/cicd/github-actions.yml.ejs +70 -0
  10. package/templates/config/database.mongo.js.ejs +29 -33
  11. package/templates/config/database.postgres.js.ejs +41 -40
  12. package/templates/config/database.prisma.js.ejs +26 -0
  13. package/templates/config/redis.js.ejs +28 -0
  14. package/templates/config/schema.prisma.ejs +20 -0
  15. package/templates/config/swagger.js.ejs +30 -0
  16. package/templates/config/websocket.js.ejs +62 -0
  17. package/templates/controllers/authController.js.ejs +152 -129
  18. package/templates/controllers/exampleController.js.ejs +92 -152
  19. package/templates/controllers/userController.js.ejs +52 -60
  20. package/templates/core/Dockerfile.ejs +41 -31
  21. package/templates/core/README.md.ejs +191 -179
  22. package/templates/core/app.js.ejs +114 -64
  23. package/templates/core/docker-compose.yml.ejs +59 -47
  24. package/templates/core/dockerignore.ejs +7 -0
  25. package/templates/core/env.ejs +25 -19
  26. package/templates/core/env.example.ejs +26 -0
  27. package/templates/core/eslintrc.json.ejs +50 -20
  28. package/templates/core/gitignore.ejs +51 -51
  29. package/templates/core/healthcheck.js.ejs +24 -24
  30. package/templates/core/jest.config.js.ejs +19 -22
  31. package/templates/core/package.json.ejs +70 -33
  32. package/templates/core/prettierrc.json.ejs +11 -11
  33. package/templates/core/server.js.ejs +64 -48
  34. package/templates/core/tsconfig.json.ejs +19 -0
  35. package/templates/middleware/auth.js.ejs +80 -66
  36. package/templates/middleware/cache.js.ejs +67 -0
  37. package/templates/middleware/errorHandler.js.ejs +50 -46
  38. package/templates/middleware/requestId.js.ejs +9 -0
  39. package/templates/middleware/validation.js.ejs +109 -47
  40. package/templates/migrations/create-users.js.ejs +50 -0
  41. package/templates/migrations/seed-users.js.ejs +34 -0
  42. package/templates/migrations/sequelizerc.ejs +8 -0
  43. package/templates/models/User.mongo.js.ejs +29 -29
  44. package/templates/models/User.postgres.js.ejs +40 -40
  45. package/templates/models/index.mongo.js.ejs +7 -7
  46. package/templates/models/index.postgres.js.ejs +11 -11
  47. package/templates/routes/authRoutes.js.ejs +222 -13
  48. package/templates/routes/exampleRoutes.js.ejs +100 -12
  49. package/templates/routes/index.js.ejs +34 -24
  50. package/templates/routes/userRoutes.js.ejs +78 -15
  51. package/templates/services/authService.js.ejs +111 -35
  52. package/templates/services/exampleService.js.ejs +112 -112
  53. package/templates/services/userService.mongodb.js.ejs +33 -33
  54. package/templates/services/userService.postgres.js.ejs +30 -30
  55. package/templates/services/userService.prisma.js.ejs +36 -0
  56. package/templates/tests/auth.test.js.ejs +83 -66
  57. package/templates/tests/example.test.js.ejs +109 -112
  58. package/templates/tests/setup.js.ejs +11 -11
  59. package/templates/tests/users.test.js.ejs +42 -42
  60. package/templates/utils/envValidator.js.ejs +23 -0
  61. package/templates/utils/errors.js.ejs +12 -12
  62. package/templates/utils/logger.js.ejs +37 -28
  63. package/templates/utils/response.js.ejs +28 -0
  64. package/templates/utils/validators.js.ejs +34 -34
  65. package/templates/config/swagger.json.ejs +0 -194
  66. package/templates/core/index.js.ejs +0 -24
@@ -1,67 +1,84 @@
1
- // templates/tests/auth.test.js.ejs
2
- const request = require('supertest');
3
- const app = require('../src/app');
4
-
5
- describe('Authentication Endpoints', () => {
6
- describe('POST /api/auth/register', () => {
7
- it('should register a new user', async () => {
8
- const userData = {
9
- username: 'testuser',
10
- email: 'test@example.com',
11
- password: 'password123',
12
- };
13
-
14
- const res = await request(app)
15
- .post('/api/auth/register')
16
- .send(userData);
17
-
18
- expect(res.statusCode).toBe(201);
19
- expect(res.body).toHaveProperty('accessToken');
20
- expect(res.body).toHaveProperty('refreshToken');
21
- expect(res.body.user).toHaveProperty('email', userData.email);
22
- });
23
-
24
- it('should return 400 for invalid email', async () => {
25
- const userData = {
26
- username: 'testuser',
27
- email: 'invalid-email',
28
- password: 'password123',
29
- };
30
-
31
- const res = await request(app)
32
- .post('/api/auth/register')
33
- .send(userData);
34
-
35
- expect(res.statusCode).toBe(400);
36
- });
37
- });
38
-
39
- describe('POST /api/auth/login', () => {
40
- it('should login with valid credentials', async () => {
41
- const credentials = {
42
- email: 'test@example.com',
43
- password: 'password123',
44
- };
45
-
46
- const res = await request(app)
47
- .post('/api/auth/login')
48
- .send(credentials);
49
-
50
- expect(res.statusCode).toBe(200);
51
- expect(res.body).toHaveProperty('accessToken');
52
- });
53
-
54
- it('should return 401 for invalid credentials', async () => {
55
- const credentials = {
56
- email: 'test@example.com',
57
- password: 'wrongpassword',
58
- };
59
-
60
- const res = await request(app)
61
- .post('/api/auth/login')
62
- .send(credentials);
63
-
64
- expect(res.statusCode).toBe(401);
65
- });
66
- });
1
+ const request = require('supertest');
2
+ const app = require('../src/app');
3
+
4
+ describe('Authentication Endpoints', () => {
5
+ describe('POST /api/auth/register', () => {
6
+ it('should register a new user', async () => {
7
+ const userData = {
8
+ username: 'testuser',
9
+ email: 'test@example.com',
10
+ password: 'Password1',
11
+ };
12
+
13
+ const res = await request(app)
14
+ .post('/api/auth/register')
15
+ .send(userData);
16
+
17
+ expect(res.statusCode).toBe(201);
18
+ expect(res.body.success).toBe(true);
19
+ expect(res.body.data).toHaveProperty('accessToken');
20
+ expect(res.body.data).toHaveProperty('refreshToken');
21
+ expect(res.body.data.user).toHaveProperty('email', userData.email);
22
+ });
23
+
24
+ it('should return 400 for invalid email', async () => {
25
+ const userData = {
26
+ username: 'testuser',
27
+ email: 'invalid-email',
28
+ password: 'Password1',
29
+ };
30
+
31
+ const res = await request(app)
32
+ .post('/api/auth/register')
33
+ .send(userData);
34
+
35
+ expect(res.statusCode).toBe(400);
36
+ expect(res.body.success).toBe(false);
37
+ });
38
+
39
+ it('should return 400 for weak password', async () => {
40
+ const userData = {
41
+ username: 'testuser',
42
+ email: 'test@example.com',
43
+ password: 'weak',
44
+ };
45
+
46
+ const res = await request(app)
47
+ .post('/api/auth/register')
48
+ .send(userData);
49
+
50
+ expect(res.statusCode).toBe(400);
51
+ });
52
+ });
53
+
54
+ describe('POST /api/auth/login', () => {
55
+ it('should login with valid credentials', async () => {
56
+ const credentials = {
57
+ email: 'test@example.com',
58
+ password: 'Password1',
59
+ };
60
+
61
+ const res = await request(app)
62
+ .post('/api/auth/login')
63
+ .send(credentials);
64
+
65
+ expect(res.statusCode).toBe(200);
66
+ expect(res.body.success).toBe(true);
67
+ expect(res.body.data).toHaveProperty('accessToken');
68
+ });
69
+
70
+ it('should return 401 for invalid credentials', async () => {
71
+ const credentials = {
72
+ email: 'test@example.com',
73
+ password: 'WrongPass1',
74
+ };
75
+
76
+ const res = await request(app)
77
+ .post('/api/auth/login')
78
+ .send(credentials);
79
+
80
+ expect(res.statusCode).toBe(401);
81
+ expect(res.body.success).toBe(false);
82
+ });
83
+ });
67
84
  });
@@ -1,113 +1,110 @@
1
- const request = require('supertest');
2
- const app = require('../src/app');
3
-
4
- describe('Example Endpoints', () => {
5
- describe('GET /api/examples', () => {
6
- it('should get all examples', async () => {
7
- const res = await request(app)
8
- .get('/api/examples');
9
-
10
- expect(res.statusCode).toBe(200);
11
- expect(res.body.success).toBe(true);
12
- expect(res.body.data).toHaveProperty('examples');
13
- expect(Array.isArray(res.body.data.examples)).toBe(true);
14
- });
15
-
16
- it('should support pagination', async () => {
17
- const res = await request(app)
18
- .get('/api/examples?page=1&limit=1');
19
-
20
- expect(res.statusCode).toBe(200);
21
- expect(res.body.pagination).toEqual({
22
- page: 1,
23
- limit: 1,
24
- });
25
- });
26
- });
27
-
28
- describe('GET /api/examples/:id', () => {
29
- it('should get example by id', async () => {
30
- const res = await request(app)
31
- .get('/api/examples/1');
32
-
33
- expect(res.statusCode).toBe(200);
34
- expect(res.body.success).toBe(true);
35
- expect(res.body.data).toHaveProperty('id', '1');
36
- });
37
-
38
- it('should return 404 for non-existent example', async () => {
39
- const res = await request(app)
40
- .get('/api/examples/999');
41
-
42
- expect(res.statusCode).toBe(404);
43
- });
44
- });
45
-
46
- describe('POST /api/examples', () => {
47
- it('should create new example', async () => {
48
- const exampleData = {
49
- title: 'Test Example',
50
- description: 'This is a test example',
51
- };
52
-
53
- const res = await request(app)
54
- .post('/api/examples')
55
- .send(exampleData);
56
-
57
- expect(res.statusCode).toBe(201);
58
- expect(res.body.success).toBe(true);
59
- expect(res.body.data).toHaveProperty('title', exampleData.title);
60
- expect(res.body.data).toHaveProperty('description', exampleData.description);
61
- });
62
-
63
- it('should return 400 for missing required fields', async () => {
64
- const res = await request(app)
65
- .post('/api/examples')
66
- .send({ title: 'Only title' });
67
-
68
- expect(res.statusCode).toBe(400);
69
- });
70
- });
71
-
72
- describe('PUT /api/examples/:id', () => {
73
- it('should update existing example', async () => {
74
- const updateData = {
75
- title: 'Updated Example',
76
- description: 'Updated description',
77
- };
78
-
79
- const res = await request(app)
80
- .put('/api/examples/1')
81
- .send(updateData);
82
-
83
- expect(res.statusCode).toBe(200);
84
- expect(res.body.success).toBe(true);
85
- expect(res.body.data).toHaveProperty('title', updateData.title);
86
- });
87
-
88
- it('should return 404 for non-existent example', async () => {
89
- const res = await request(app)
90
- .put('/api/examples/999')
91
- .send({ title: 'Updated' });
92
-
93
- expect(res.statusCode).toBe(404);
94
- });
95
- });
96
-
97
- describe('DELETE /api/examples/:id', () => {
98
- it('should delete existing example', async () => {
99
- const res = await request(app)
100
- .delete('/api/examples/2');
101
-
102
- expect(res.statusCode).toBe(200);
103
- expect(res.body.success).toBe(true);
104
- });
105
-
106
- it('should return 404 for non-existent example', async () => {
107
- const res = await request(app)
108
- .delete('/api/examples/999');
109
-
110
- expect(res.statusCode).toBe(404);
111
- });
112
- });
1
+ const request = require('supertest');
2
+ const app = require('../src/app');
3
+
4
+ describe('Example Endpoints', () => {
5
+ describe('GET /api/examples', () => {
6
+ it('should get all examples', async () => {
7
+ const res = await request(app)
8
+ .get('/api/examples');
9
+
10
+ expect(res.statusCode).toBe(200);
11
+ expect(res.body.success).toBe(true);
12
+ expect(Array.isArray(res.body.data)).toBe(true);
13
+ });
14
+
15
+ it('should support pagination', async () => {
16
+ const res = await request(app)
17
+ .get('/api/examples?page=1&limit=1');
18
+
19
+ expect(res.statusCode).toBe(200);
20
+ expect(res.body.meta).toHaveProperty('page', 1);
21
+ expect(res.body.meta).toHaveProperty('limit', 1);
22
+ expect(res.body.meta).toHaveProperty('total');
23
+ });
24
+ });
25
+
26
+ describe('GET /api/examples/:id', () => {
27
+ it('should get example by id', async () => {
28
+ const res = await request(app)
29
+ .get('/api/examples/1');
30
+
31
+ expect(res.statusCode).toBe(200);
32
+ expect(res.body.success).toBe(true);
33
+ expect(res.body.data).toHaveProperty('id', '1');
34
+ });
35
+
36
+ it('should return 404 for non-existent example', async () => {
37
+ const res = await request(app)
38
+ .get('/api/examples/999');
39
+
40
+ expect(res.statusCode).toBe(404);
41
+ });
42
+ });
43
+
44
+ describe('POST /api/examples', () => {
45
+ it('should create new example', async () => {
46
+ const exampleData = {
47
+ title: 'Test Example',
48
+ description: 'This is a test example',
49
+ };
50
+
51
+ const res = await request(app)
52
+ .post('/api/examples')
53
+ .send(exampleData);
54
+
55
+ expect(res.statusCode).toBe(201);
56
+ expect(res.body.success).toBe(true);
57
+ expect(res.body.data).toHaveProperty('title', exampleData.title);
58
+ });
59
+
60
+ it('should return 400 for missing required fields', async () => {
61
+ const res = await request(app)
62
+ .post('/api/examples')
63
+ .send({ title: 'Only title' });
64
+
65
+ expect(res.statusCode).toBe(400);
66
+ });
67
+ });
68
+
69
+ describe('PUT /api/examples/:id', () => {
70
+ it('should update existing example', async () => {
71
+ const updateData = {
72
+ title: 'Updated Example',
73
+ description: 'Updated description',
74
+ };
75
+
76
+ const res = await request(app)
77
+ .put('/api/examples/1')
78
+ .send(updateData);
79
+
80
+ expect(res.statusCode).toBe(200);
81
+ expect(res.body.success).toBe(true);
82
+ expect(res.body.data).toHaveProperty('title', updateData.title);
83
+ });
84
+
85
+ it('should return 404 for non-existent example', async () => {
86
+ const res = await request(app)
87
+ .put('/api/examples/999')
88
+ .send({ title: 'Updated' });
89
+
90
+ expect(res.statusCode).toBe(404);
91
+ });
92
+ });
93
+
94
+ describe('DELETE /api/examples/:id', () => {
95
+ it('should delete existing example', async () => {
96
+ const res = await request(app)
97
+ .delete('/api/examples/2');
98
+
99
+ expect(res.statusCode).toBe(200);
100
+ expect(res.body.success).toBe(true);
101
+ });
102
+
103
+ it('should return 404 for non-existent example', async () => {
104
+ const res = await request(app)
105
+ .delete('/api/examples/999');
106
+
107
+ expect(res.statusCode).toBe(404);
108
+ });
109
+ });
113
110
  });
@@ -1,12 +1,12 @@
1
- // templates/tests/setup.js.ejs
2
- // Global test setup
3
- process.env.NODE_ENV = 'test';
4
- <% if (hasDatabase) { %>process.env.JWT_SECRET = 'test-secret';
5
- process.env.JWT_REFRESH_SECRET = 'test-refresh-secret';<% } %>
6
-
7
- // Suppress console logs during tests
8
- if (process.env.NODE_ENV === 'test') {
9
- console.log = jest.fn();
10
- console.error = jest.fn();
11
- console.warn = jest.fn();
1
+ // templates/tests/setup.js.ejs
2
+ // Global test setup
3
+ process.env.NODE_ENV = 'test';
4
+ <% if (hasDatabase) { %>process.env.JWT_SECRET = 'test-secret';
5
+ process.env.JWT_REFRESH_SECRET = 'test-refresh-secret';<% } %>
6
+
7
+ // Suppress console logs during tests
8
+ if (process.env.NODE_ENV === 'test') {
9
+ console.log = jest.fn();
10
+ console.error = jest.fn();
11
+ console.warn = jest.fn();
12
12
  }
@@ -1,43 +1,43 @@
1
- // templates/tests/users.test.js.ejs
2
- const request = require('supertest');
3
- const jwt = require('jsonwebtoken');
4
- const app = require('../src/app');
5
-
6
- describe('User Endpoints', () => {
7
- let authToken;
8
-
9
- beforeAll(() => {
10
- // Create a test token
11
- authToken = jwt.sign(
12
- { userId: 'test-user-id', username: 'testuser', email: 'test@example.com' },
13
- process.env.JWT_SECRET,
14
- { expiresIn: '1h' }
15
- );
16
- });
17
-
18
- describe('GET /api/users/profile', () => {
19
- it('should get user profile with valid token', async () => {
20
- const res = await request(app)
21
- .get('/api/users/profile')
22
- .set('Authorization', `Bearer ${authToken}`);
23
-
24
- expect(res.statusCode).toBe(200);
25
- expect(res.body).toHaveProperty('user');
26
- });
27
-
28
- it('should return 401 without token', async () => {
29
- const res = await request(app)
30
- .get('/api/users/profile');
31
-
32
- expect(res.statusCode).toBe(401);
33
- });
34
-
35
- it('should return 403 with invalid token', async () => {
36
- const res = await request(app)
37
- .get('/api/users/profile')
38
- .set('Authorization', 'Bearer invalid-token');
39
-
40
- expect(res.statusCode).toBe(403);
41
- });
42
- });
1
+ const request = require('supertest');
2
+ const jwt = require('jsonwebtoken');
3
+ const app = require('../src/app');
4
+
5
+ describe('User Endpoints', () => {
6
+ let authToken;
7
+
8
+ beforeAll(() => {
9
+ authToken = jwt.sign(
10
+ { userId: 'test-user-id', username: 'testuser', email: 'test@example.com' },
11
+ process.env.JWT_SECRET,
12
+ { expiresIn: '1h' }
13
+ );
14
+ });
15
+
16
+ describe('GET /api/users/profile', () => {
17
+ it('should get user profile with valid token', async () => {
18
+ const res = await request(app)
19
+ .get('/api/users/profile')
20
+ .set('Authorization', `Bearer ${authToken}`);
21
+
22
+ expect(res.statusCode).toBe(200);
23
+ expect(res.body.success).toBe(true);
24
+ });
25
+
26
+ it('should return 401 without token', async () => {
27
+ const res = await request(app)
28
+ .get('/api/users/profile');
29
+
30
+ expect(res.statusCode).toBe(401);
31
+ expect(res.body.success).toBe(false);
32
+ });
33
+
34
+ it('should return 401 with invalid token', async () => {
35
+ const res = await request(app)
36
+ .get('/api/users/profile')
37
+ .set('Authorization', 'Bearer invalid-token');
38
+
39
+ expect(res.statusCode).toBe(401);
40
+ expect(res.body.success).toBe(false);
41
+ });
42
+ });
43
43
  });
@@ -0,0 +1,23 @@
1
+ const requiredVars = [
2
+ <% if (hasAuth) { %> 'JWT_SECRET',
3
+ 'JWT_REFRESH_SECRET',
4
+ <% } %><% if (hasRedis) { %> 'REDIS_URL',
5
+ <% } %><% if (db === 'mongodb') { %> 'MONGO_URI',<% } %><% if (db === 'postgresql' || isPrisma) { %> 'DATABASE_URL',<% } %>
6
+ ];
7
+
8
+ const validateEnv = () => {
9
+ const missing = requiredVars.filter((key) => !process.env[key]);
10
+ if (missing.length > 0) {
11
+ console.error(`\nFATAL: Missing required environment variables:\n ${missing.join('\n ')}\n`);
12
+ console.error('Copy .env.example to .env and fill in the values.\n');
13
+ process.exit(1);
14
+ }
15
+ <% if (hasAuth) { %>
16
+ if (process.env.JWT_SECRET.length < 32) {
17
+ console.error('FATAL: JWT_SECRET must be at least 32 characters long.');
18
+ process.exit(1);
19
+ }
20
+ <% } %>
21
+ };
22
+
23
+ module.exports = { validateEnv };
@@ -1,13 +1,13 @@
1
- // templates/utils/errors.js.ejs
2
- class AppError extends Error {
3
- constructor(message, statusCode) {
4
- super(message);
5
- this.statusCode = statusCode;
6
- this.status = `${statusCode}`.startsWith('4') ? 'fail' : 'error';
7
- this.isOperational = true;
8
-
9
- Error.captureStackTrace(this, this.constructor);
10
- }
11
- }
12
-
1
+ // templates/utils/errors.js.ejs
2
+ class AppError extends Error {
3
+ constructor(message, statusCode) {
4
+ super(message);
5
+ this.statusCode = statusCode;
6
+ this.status = `${statusCode}`.startsWith('4') ? 'fail' : 'error';
7
+ this.isOperational = true;
8
+
9
+ Error.captureStackTrace(this, this.constructor);
10
+ }
11
+ }
12
+
13
13
  module.exports = { AppError };
@@ -1,28 +1,37 @@
1
- // templates/utils/logger.js.ejs
2
- const createLogger = (context = 'APP') => {
3
- const log = (level, message, meta = {}) => {
4
- const timestamp = new Date().toISOString();
5
- const logEntry = {
6
- timestamp,
7
- level: level.toUpperCase(),
8
- context,
9
- message,
10
- ...meta,
11
- };
12
-
13
- if (process.env.NODE_ENV === 'development') {
14
- console.log(JSON.stringify(logEntry, null, 2));
15
- } else {
16
- console.log(JSON.stringify(logEntry));
17
- }
18
- };
19
-
20
- return {
21
- info: (message, meta) => log('info', message, meta),
22
- warn: (message, meta) => log('warn', message, meta),
23
- error: (message, meta) => log('error', message, meta),
24
- debug: (message, meta) => log('debug', message, meta),
25
- };
26
- };
27
-
28
- module.exports = { createLogger };
1
+ <% if (logger === 'winston') { %>const winston = require('winston');
2
+
3
+ const logger = winston.createLogger({
4
+ level: process.env.LOG_LEVEL || 'info',
5
+ format: winston.format.combine(
6
+ winston.format.timestamp(),
7
+ winston.format.errors({ stack: true }),
8
+ process.env.NODE_ENV === 'production'
9
+ ? winston.format.json()
10
+ : winston.format.combine(winston.format.colorize(), winston.format.simple())
11
+ ),
12
+ defaultMeta: { service: '<%= projectName %>' },
13
+ transports: [
14
+ new winston.transports.Console(),
15
+ ],
16
+ });
17
+
18
+ const createLogger = (context = 'APP') => {
19
+ return logger.child({ context });
20
+ };
21
+
22
+ module.exports = { logger, createLogger };
23
+ <% } else if (logger === 'pino') { %>const pino = require('pino');
24
+
25
+ const logger = pino({
26
+ level: process.env.LOG_LEVEL || 'info',
27
+ transport: process.env.NODE_ENV !== 'production'
28
+ ? { target: 'pino-pretty', options: { colorize: true } }
29
+ : undefined,
30
+ });
31
+
32
+ const createLogger = (context = 'APP') => {
33
+ return logger.child({ context });
34
+ };
35
+
36
+ module.exports = { logger, createLogger };
37
+ <% } %>
@@ -0,0 +1,28 @@
1
+ const success = (res, data, statusCode = 200, meta = {}) => {
2
+ const response = { success: true, data };
3
+ if (Object.keys(meta).length > 0) {
4
+ response.meta = meta;
5
+ }
6
+ return res.status(statusCode).json(response);
7
+ };
8
+
9
+ const created = (res, data) => {
10
+ return res.status(201).json({ success: true, data });
11
+ };
12
+
13
+ const paginated = (res, data, pagination) => {
14
+ return res.status(200).json({
15
+ success: true,
16
+ data,
17
+ meta: { pagination },
18
+ });
19
+ };
20
+
21
+ const error = (res, message, statusCode = 500) => {
22
+ return res.status(statusCode).json({
23
+ success: false,
24
+ error: message,
25
+ });
26
+ };
27
+
28
+ module.exports = { success, created, paginated, error };