forked from mpmedia/avow-ci
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.js
45 lines (36 loc) · 1.08 KB
/
config.js
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
// Core configuration for DozerJS
var config = {
// Environment configuration
env: {
// Public root
publicHTTP: 'public',
// Port to run over
port: 8181
},
// Session secret
secret: '6de5661ab3c401bcb266dff913',
// Express logging
expressLogging: 'short',
// CORS configuration
cors: {
origin: '*',
methods: 'GET,PUT,POST,DELETE',
headers: 'Content-Type'
},
// Custom express middleware components
middleware: [],
expressConfig: [],
// Define common regular expressions for validation
regEx: {
float: /^[0-9]*[.][0-9]+$/,
alphanum: /^[a-zA-Z0-9]+$/,
hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/,
slug: /^[a-z0-9-]+$/i,
email: /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/,
url: /^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/,
ipv4: /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,
phone: /^(([0-9]{1})*[- .(]*([0-9]{3})[- .)]*[0-9]{3}[- .]*[0-9]{4})+$/,
ssn: /^([0-9]{3}[-]*[0-9]{2}[-]*[0-9]{4})+$/
}
};
module.exports = config;