-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdev.config.js
More file actions
126 lines (111 loc) · 2.77 KB
/
dev.config.js
File metadata and controls
126 lines (111 loc) · 2.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
/**
* Securiace Technologies - Development Configuration
* This file contains development-specific settings and utilities
*/
const path = require('path');
const devConfig = {
// Development server settings
devServer: {
port: 3000,
host: 'localhost',
open: true,
hot: true,
compress: true,
historyApiFallback: true,
},
// Database settings for local development
database: {
type: 'sqlite',
url: 'file:./dev.db',
logging: true,
synchronize: true,
},
// Mock API settings
mockApi: {
enabled: true,
delay: 100, // Simulate network delay in ms
baseUrl: 'http://localhost:3000/api',
},
// Feature flags for development
features: {
analytics: false,
chat: false,
blog: true,
domainSearch: false,
maintenance: false,
debug: true,
},
// Logging settings
logging: {
level: 'debug',
console: true,
file: true,
filePath: './logs/dev.log',
},
// Hot reload settings
hotReload: {
enabled: true,
exclude: ['node_modules', '.next', 'dist'],
},
// Development tools
tools: {
bundleAnalyzer: false,
sourceMaps: true,
typeChecking: true,
linting: true,
formatting: true,
},
// Environment variables for development
env: {
NODE_ENV: 'development',
NEXT_PUBLIC_DEBUG: 'true',
NEXT_PUBLIC_APP_URL: 'http://localhost:3000',
NEXT_PUBLIC_APP_NAME: 'Securiace Technologies (Dev)',
},
// Paths
paths: {
src: path.resolve(__dirname, 'src'),
public: path.resolve(__dirname, 'public'),
components: path.resolve(__dirname, 'src/components'),
pages: path.resolve(__dirname, 'src/app'),
styles: path.resolve(__dirname, 'src/styles'),
utils: path.resolve(__dirname, 'src/lib'),
types: path.resolve(__dirname, 'src/types'),
data: path.resolve(__dirname, 'data'),
logs: path.resolve(__dirname, 'logs'),
},
// Development utilities
utils: {
// Generate random data for testing
generateTestData: (count = 10) => {
return Array.from({ length: count }, (_, i) => ({
id: `test-${i + 1}`,
name: `Test Item ${i + 1}`,
createdAt: new Date().toISOString(),
}));
},
// Mock API response
mockApiResponse: (data, delay = 100) => {
return new Promise(resolve => {
setTimeout(() => {
resolve({
success: true,
data,
timestamp: new Date().toISOString(),
});
}, delay);
});
},
// Development logger
log: (message, data = null) => {
const timestamp = new Date().toISOString();
const logMessage = `[${timestamp}] ${message}`;
if (data) {
console.log(logMessage, data);
} else {
console.log(logMessage);
}
},
},
};
module.exports = devConfig;