3 // Provide default values for all configuration.
5 const packageName
= require('../package.json').name
;
6 const common
= require('../src/common');
8 const defaultOptions
= {
9 // Uniquely identify this instance, used to tag work-in-progress.
10 nodeId: common
.requestId(), // Default to ephemeral ID: easiest for clustered deployments.
12 // Dingus API Server Framework options. Be sure to set the one REQUIRED option here.
14 // This needs to be the full externally accessible root URL, including any proxyPrefix component, which clients will connect to, and which topics will list as their hub link.
15 selfBaseUrl: '', // REQUIRED
17 // trustProxy: true, // If true, trust values of some headers regarding client IP address and protocol.
18 proxyPrefix: '', // Leading path parts to ignore when parsing routes, and include when constructing links, e.g. /hub
23 connectionString: '', // e.g. sqlite://path/to/dbfile.sqlite
24 queryLogLevel: undefined, // Set to log queries
29 ignoreBelowLevel: 'info',
32 // Lease time limits, if not specified per-topic. Comments are defaults in code.
34 // leaseSecondsPreferred: 86400 * 10,
35 // leaseSecondsMin: 86400 * 1,
36 // leaseSecondsMax: 86400 * 365,
40 pageTitle: packageName
, // title on html pages
41 strictSecrets: false, // If true, reject requests with secrets but not over https
42 publicHub: true, // Accept publish requests as new topics.
43 processImmediately: true, // If true, immediately attempt to process requests when accepted.
47 strictTopicHubLink: true, // If true, deletes topics which do not list us (dingus.selfBaseUrl) as a hub relation.
48 retryBackoffSeconds: [60, 120, 360, 1440, 7200, 43200, 86400], // failed requests retry according to number of attempts
49 claimTimeoutSeconds: 600, // how long until an in-progress task is deemed abandoned
52 // Outgoing request UA header. Comments are defaults in code.
54 // product: packageName,
55 // version: packageVersion,
56 // implementation: Enum.Specification,
60 basicRealm: packageName
, // Realm prompt for login on administration pages
61 secureAuthOnly: true, // Require secure transport for authentication.
65 concurrency: 10, // maximum number of tasks to process at once
66 pollingEnabled: true, // periodically check for new tasks
67 recurrSleepMs: 60000, // check this often
72 module
.exports
= defaultOptions
;