This repository has been archived by the owner on May 10, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
config.default.js
149 lines (123 loc) · 2.45 KB
/
config.default.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
145
146
147
148
149
/* global rdf */
var acceptAllCertsRequest = require('./lib/utils/accept-all-certs-request');
var config = {
hostname: 'localhost',
port: 8443
};
config.appCtx = {};
config.modules = {
express: {
module: 'ldapp-express'
},
absoluteUrl: {
module: 'ldapp-absolute-url',
dependency: 'express'
},
core: {
dependency: ['absoluteUrl','express']
},
authn: {
module: 'ldapp-authn',
dependency: ['core']
},
staticHosting: {
module: 'ldapp-static',
dependency: ['core']
},
corsProxy: {
module: 'ldapp-cors-proxy',
dependency: ['core']
},
graphStore: {
module: './lib/graph-module',
dependency: ['core']
},
blogApp: {
module: 'ldapp-app-blog'
},
apps: {
dependency: ['blogApp']
},
listener: {
module: 'ldapp-listener',
dependency: [
'core',
'authn',
'staticHosting',
'corsProxy',
'graphStore',
'apps'
]
}
};
// RDF Interfaces implementation + RDF-Ext
global.rdf = require('rdf-ext')();
// authentication
config.authn = {
StoreClass: rdf.LdpStore,
storeOptions: {
request: acceptAllCertsRequest
}
};
// static file hosting
config.static = [
{
route: '/',
path: 'public/'
}
];
// persistence store
config.store = new rdf.InMemoryStore();
/*config.store = new config.rdf.SparqlStore({
'endpointUrl': 'http://localhost:3030/ds/query',
'updateUrl': 'http://localhost:3030/ds/update'
});*/
// initial graph data
config.graphs = {
'https://localhost:8443/.access': './data/access.ttl',
'https://localhost:8443/blog': './data/blog.ttl',
'https://localhost:8443/card': './data/card.ttl'
};
// WebID
config.webid = {
'iri': 'https://localhost:8443/card#me',
'keyFile': './data/webid.key',
'certFile': './data/webid.crt',
'pkcs12File': './data/webid.p12'
};
// UAC
config.uac = {
'disable': false,
'graph': 'https://localhost:8443/.access'
};
// LDP
config.ldp = {
'defaultAgent': 'https://localhost:8443/anonymous#me'
};
// CORS proxy
config.cors = {
path: '/cors',
'request': acceptAllCertsRequest
};
config.session = {
'secret': '1234567890'
};
// core
config.core = {
'basePath': '',
'proxy': false
};
config.expressSettings = {
'trust proxy': 'loopback',
'x-powered-by': null
};
config.listener = {
hostname: config.hostname,
port: config.port,
tls: {
keyFile: './data/localhost.key',
certFile: './data/localhost.crt',
requestCert: true
}
};
module.exports = config;