-
Notifications
You must be signed in to change notification settings - Fork 2
/
settings.js
executable file
·144 lines (127 loc) · 2.9 KB
/
settings.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
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
/**
* Main settings.
*/
// Node port
exports.port = 8000;
// Root path
var rootPath = process.cwd();
exports.rootPath = rootPath;
// Secret app key
exports.secret = 'P3p34rne5T0y43st4aqU1y4T0d0sv4aC0mb4t1r';
// API version
exports.apiPrefix = '/api/v1';
// Paths
// Libs path
exports.libsPath = rootPath + '/libs/';
// Middlewares path
exports.middlewaresPath = rootPath + '/middlewares/';
// // Models path
exports.modelsPath = rootPath + '/data/models/';
// // Schemas path
exports.schemasPath = rootPath + '/data/schemas/';
// // Views path
exports.viewsPath = rootPath + '/views/';
// Modules path
exports.modulesPath = rootPath + '/modules/';
// Themes path
exports.themesPath = rootPath + '/public/themes/';
// Files path
exports.filesPath = rootPath + '/public/files/';
// Widgets path
exports.widgetsPath = rootPath + '/widgets/';
// Social widgets path
exports.socialwidgetsPath = rootPath + '/widgets/social_widgets/';
// Custom Widgets path
exports.customwidgetsPath = rootPath + '/widgets/custom_widgets/';
// Database name
exports.dbSettings = {
dbURL: 'mongodb://localhost/intrepid-web',
dbName: 'intrepid-web'
};
// Site settings
exports.site = {
// Site title
title: {
property: 'title',
content: 'IntrepidJS'
},
// Default theme
theme: {
property: 'theme',
content: 'default'
},
default_themes: {
property: 'default_themes',
content: ['default', 'modern'],
},
sections: {
property: 'sections',
content: []
}
};
// Site static routes
exports.siteRoutes = {
// Admin route
admin: {
route: '/admin'
},
};
// Main modules
exports.main_modules = [
{
name: 'chat',
real_name: 'Chat',
description: 'Chat core module',
enabled: true,
kind: ['notification']
},
{
name: 'mail',
real_name: 'Mail',
description: 'Mail core module',
enabled: true,
kind: ['notification']
}
];
// Modules to load
exports.modules = [
'documentation'
];
// Modules models
exports.models = [];
// Widgets
exports.widgets = {
// Social widgets
social: [{
partials: [],
name: 'twitter',
real_name: 'Twitter',
main_url: null
}],
// Custom widgets
custom: [{
partials: [],
name: 'carousel',
real_name: 'Carousel',
main_url: null
}]
};
// Param to ignore invalid routes
exports.invalid_routes = true;
// TODO: Improve this fucking shit
// App instance
exports.app_instance = null;
exports.mail_instance = null;
// Site static files
exports.styleFiles = null;
exports.jsFiles = null;
exports.staticFiles = function(app) {
if (!app.locals.styleFiles) {
app.locals.styleFiles = [];
}
if (!app.locals.jsFiles) {
app.locals.jsFiles = [];
}
this.styleFiles = app.locals.styleFiles;
this.jsFiles = app.locals.jsFiles;
};