-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconstants.js
54 lines (46 loc) · 2.03 KB
/
constants.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
const API_PROTOCOL = process.env.API_PROTOCOL || "http" ;
const API_HOST = process.env.API_HOST || "localhost" ;
const API_PORT = process.env.API_PORT || "8080" ;
// const JAVA_API_PROTOCOL = process.env.JAVA_API_PROTOCOL || "http" ;
// const JAVA_API_HOST = process.env.JAVA_API_HOST || "localhost" ;
/** Folders */
const CONFIG_FOLDER = "configs" ;
const FOLDER_CACHE = "portal-cache" ;
const CONTENT_CACHE = "content-cache" ;
/** Config Files */
const CONFIG_CONTENT_PAGES = "pages.json" ;
/** Runtime Files */
const FILE_FILTER_CACHE = "full-filter-cache.json" ;
const FILE_SHORT_FILTER_CACHE = "short-filter-cache.json";
const FILE_SMART_FILTER_CACHE = "smart-filter-cache.json";
const FILE_RECENT_CACHE = "recent-docs.json";
const AUTH_JSON = "auth.json";
const GAWATI_JSON = "gawati.json";
const API_SERVER_BASE = () =>
API_PROTOCOL + "://" + API_HOST + ":" + API_PORT + "/exist/restxq";
// const JAVA_API_SERVER_BASE = () =>
// JAVA_API_PROTOCOL + "://" + JAVA_API_HOST ;
const API_FILTER_CACHE = API_SERVER_BASE() + "/gw/filter-cache/json" ;
const API_RECENT = API_SERVER_BASE() + "/gw/recent/expressions/summary/json?count=4&from=1&to=4" ;
const API_SEARCH_FILTER = API_SERVER_BASE() + "/gw/search/filter/json" ;
const PROCESS_NAME_PORTAL_SERVER = "PORTAL-SERVER";
const PROCESS_NAME_PORTAL_SERVER_CRON = "PORTAL-CRON";
const API_DOC = API_SERVER_BASE() + "/gw/doc/json";
module.exports = {
CONFIG_FOLDER: CONFIG_FOLDER,
CONFIG_CONTENT_PAGES: CONFIG_CONTENT_PAGES,
CONTENT_CACHE: CONTENT_CACHE,
FOLDER_CACHE: FOLDER_CACHE,
FILE_FILTER_CACHE: FILE_FILTER_CACHE,
FILE_SHORT_FILTER_CACHE: FILE_SHORT_FILTER_CACHE,
FILE_SMART_FILTER_CACHE: FILE_SMART_FILTER_CACHE,
FILE_RECENT_CACHE: FILE_RECENT_CACHE,
AUTH_JSON: AUTH_JSON,
GAWATI_JSON: GAWATI_JSON,
API_FILTER_CACHE: API_FILTER_CACHE,
API_SEARCH_FILTER: API_SEARCH_FILTER,
API_RECENT: API_RECENT,
PROCESS_NAME_PORTAL_SERVER: PROCESS_NAME_PORTAL_SERVER,
PROCESS_NAME_PORTAL_SERVER_CRON: PROCESS_NAME_PORTAL_SERVER_CRON,
API_DOC: API_DOC,
};