UNPKG

1 kBJavaScriptView Raw
1module.exports = {
2 server: {
3 protocol: "https",
4 host: "localhost",
5 port: 7042,
6 // No slash in the end.
7 url: "http://localhost:7042"
8 },
9
10 router: {
11 // e.g. api/v2/
12 urlPrefix: "",
13 // e.g. "[a-f\d]{8}-[a-f\d]{4}-4[a-f\d]{3}-[89ab][a-f\d]{3}-[a-f\d]{12}"
14 primaryKeyPattern: "\\d+"
15 },
16
17 cors: {
18 // e.g. * | ["example.com"] | () => {} (synchronous callback function with Message context returning array of allowed origins)
19 origin: ["localhost:7042"],
20 methods: ["OPTIONS", "GET", "POST", "PUT", "DELETE"],
21 headers: ["Content-Type", "Set-Cookies", "Authorization"],
22 credentials: false,
23 maxAge: 5 /* seconds */
24 },
25
26 websockets: {
27 clientTracking: true,
28 perMessageDeflate: false,
29 maxPayload: 400 * 1024 * 1024 /* bytes*/
30 },
31
32 media: {
33 urlPath: "/media",
34 saveDir: "../../media"
35 }
36};