forked from itteco/iframely
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.js
76 lines (64 loc) · 1.83 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
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
(function() {
var _ = require('underscore');
var path = require('path');
var fs = require('fs');
var config = {
// Default cache engine to prevent warning.
CACHE_ENGINE: 'node-cache',
CACHE_TTL: 24 * 60 * 60,
metaLoadingTimeout: 15 * 1000,
T: {
text_html: "text/html",
javascript: "application/javascript",
safe_html: "text/x-safe-html",
image_jpeg: "image/jpeg",
flash: "application/x-shockwave-flash",
image: "image",
image_icon: "image/icon",
image_png: "image/png",
image_svg: "image/svg",
video_mp4: "video/mp4",
video_ogg: "video/ogg"
},
REL_GROUPS: [
"reader",
"player",
"survey",
"image",
"thumbnail",
"logo",
"icon"
],
MEDIA_ATTRS: [
"width",
"min-width",
"max-width",
"height",
"min-height",
"max-height",
"aspect-ratio"
],
R: {
player: "player",
thumbnail: "thumbnail",
image: "image",
reader: "reader",
file: "file",
survey: "survey",
iframely: "iframely",
instapaper: "instapaper",
og: "og",
twitter: "twitter",
oembed: "oembed",
icon: "icon",
logo: "logo"
}
};
var local_config_path = path.resolve(__dirname, "config.local.js");
if (fs.existsSync(local_config_path)) {
var local = require(local_config_path);
_.extend(config, local);
}
config.baseStaticUrl = config.baseAppUrl + config.relativeStaticUrl;
module.exports = config;
})();