-
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathdevelopment.config.js
More file actions
165 lines (163 loc) · 4.55 KB
/
development.config.js
File metadata and controls
165 lines (163 loc) · 4.55 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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
import {
PRICING_VERSION,
PLAN_QUOTAS,
RATIOS,
STRIPE_PRICE_CENTS,
STRIPE_PACK_CENTS,
} from './billing.pricing.constants.js';
const config = {
app: {
title: 'Devkit Node - Development Environment',
description: 'Node - Boilerplate Back : Express, Jwt, Mongo',
keywords: 'node, express, mongo, jwt, stack, boilerplate',
googleAnalyticsTrackingID: 'DEVKIT_NODE_app_googleAnalyticsTrackingID',
contact: 'contact@example.com',
},
swagger: {
enable: true,
},
api: {
protocol: 'http',
port: 3000,
host: '127.0.0.1',
base: 'api',
timeout: 2 * 60 * 1000,
},
db: {
uri: 'mongodb://127.0.0.1:27017/NodeDev',
debug: true,
options: {
user: '',
pass: '',
/**
* Uncomment to enable ssl certificate based authentication to mongodb
* servers. Adjust the settings below for your specific certificate
* setup.
ssl: true,
sslValidate: false,
checkServerIdentity: false,
sslCA: './config/sslcerts/ssl-ca.pem',
sslCert: './config/sslcerts/ssl-cert.pem',
sslKey: './config/sslcerts/ssl-key.pem',
sslPass: '1234'
*/
},
},
// SSL on express server (FYI : Wiki)
// secure: {
// ssl: false,
// key: './config/sslcerts/key.pem',
// cert: './config/sslcerts/cert.pem',
// },
log: {
// logging with Morgan - https://github.com/expressjs/morgan
// Can specify one of 'combined', 'common', 'dev', 'short', 'tiny', 'custom'
format: 'custom',
pattern: ':requestId :id :email :method :url :status :response-time ms - :res[content-length]', // only for custom format
// Structured JSON output for Winston console transport (enable in production)
json: false,
// Winston log level: error, warn, info, http, verbose, debug, silly
level: 'info',
fileLogger: {
directoryPath: process.cwd(),
fileName: 'app.log',
maxsize: 10485760,
maxFiles: 2,
json: false,
},
},
csrf: {
csrf: false,
csp: false,
xframe: 'SAMEORIGIN',
p3p: 'ABCDEF',
xssProtection: true,
},
bodyParser: {
limit: '500kb',
},
validation: {
supportedMethods: ['post', 'put'],
},
cors: {
origin: ['http://localhost:8080'],
credentials: true,
},
trust: {
proxy: false,
},
analytics: {
posthog: {
enabled: process.env.DEVKIT_NODE_analytics_posthog_enabled === 'true',
key: process.env.DEVKIT_NODE_analytics_posthog_key ?? '',
host: process.env.DEVKIT_NODE_analytics_posthog_host ?? 'https://eu.i.posthog.com',
appTag: process.env.DEVKIT_NODE_analytics_posthog_appTag ?? '',
flushAt: 20,
flushInterval: 10000,
errorTracking: process.env.DEVKIT_NODE_analytics_posthog_errorTracking === 'true',
autoCapture: process.env.DEVKIT_NODE_analytics_posthog_autoCapture === 'true',
},
},
domain: '',
cookie: {
secure: false, // false in dev (HTTP localhost)
sameSite: 'strict',
},
mailer: {
provider: 'nodemailer', // 'nodemailer' (default) or 'resend'
from: 'DEVKIT_NODE_mailer_from',
options: {
// nodemailer options
service: 'DEVKIT_NODE_mailer_options_service',
auth: {
user: 'DEVKIT_NODE_mailer_options_auth_user',
pass: 'DEVKIT_NODE_mailer_options_auth_pass',
},
// resend options
apiKey: 'DEVKIT_NODE_mailer_options_apiKey',
},
},
seedDB: {
seed: true,
options: {
logResults: true,
seedTasks: [
{
title: 'title1',
description: 'do something about something else',
},
{
title: 'title2',
description: 'do something about something else',
},
],
seedUser: {
provider: 'local',
email: 'seeduser@localhost.com',
firstName: 'User',
lastName: 'Local',
displayName: 'User Local',
roles: ['user'],
},
seedAdmin: {
provider: 'local',
email: 'seedadmin@localhost.com',
firstName: 'Admin',
lastName: 'Local',
displayName: 'Admin Local',
roles: ['user', 'admin'],
},
},
},
billing: {
/**
* Pricing constants contract — safe devkit defaults.
* Downstream projects override these values in their own config file.
* These values are also directly importable from
* `config/defaults/billing.pricing.constants.js` for migrations and
* standalone tooling that cannot import the full config object.
*/
pricing: { PRICING_VERSION, PLAN_QUOTAS, RATIOS, STRIPE_PRICE_CENTS, STRIPE_PACK_CENTS },
},
};
export default config;