forked from serby/ctrl
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproperties.js
More file actions
74 lines (70 loc) · 1.53 KB
/
properties.js
File metadata and controls
74 lines (70 loc) · 1.53 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
var
_ = require('underscore'),
basePort = 3020;
var properties = {
version: '0.0.1',
name: 'Control',
tagline: 'Control CMS by Paul Serby',
description: 'This is the inital config',
keywords: 'Control',
pageTitle: 'Control CMS',
port: basePort + 1,
email: 'paul.serby@clock.co.uk',
siteUrl: 'http://localhost:' + (basePort + 1),
logPath: __dirname + '/logs',
cachePath: __dirname + '/cache',
dataPath: __dirname + '/data',
binaryCachePath: '/image/',
database: {
host: '127.0.0.1',
port: 27017,
name: 'Control-Development'
},
defaultSearchResultSize: 30
};
var environmentProperties = {
development: {},
testing: {
siteUrl: 'http://localhost:' + (basePort + 2),
port: basePort + 2,
hosts: [
{
host: 'localhost',
sshPort: 22
}
],
database: {
replSet: {
name: 'Control',
servers: [
{ host: 'localhost', port: 28000 },
{ host: 'localhost', port: 28001 }
]
},
name: 'Control-Testing'
}
},
production: {
siteUrl: 'http://localhost:' + (basePort + 2),
port: basePort + 3,
email: 'paul.serby@clock.co.uk',
hosts: [
{
host: '',
sshPort: 17510
}
],
database: {
host: '127.0.0.1',
port: 27017,
name: 'Control-Production'
}
}
};
exports.getProperties = function(environment) {
environment = environment || process.env.NODE_ENV || 'development';
if (environmentProperties[environment] === undefined) {
throw new RangeError('No properties for environment \'' + environment + '\'');
}
return _.extend(properties, environmentProperties[environment]);
};