-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings.js.example
147 lines (121 loc) · 4.56 KB
/
settings.js.example
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
'use strict';
var path = require('path');
var fs = require('fs');
module.exports = {
// Replication and lab-device server socket
// Comment these out to disable replication server
host: 'localhost',
port: 4200,
// HTTP(S) server socket
// Comment these out to disable webserver
// If either webTLSKey or webTLSCert is not set
// then webserver will be HTTP, otherwise it will be HTTPS
webHost: 'localhost',
webPort: 8000, // defaults to 80 for HTTP and 443 for HTTPS
// webTLSKey: fs.readFileSync('tls/web_key.pem'),
// webTLSCert: fs.readFileSync('tls/web_cert.pem'),
// If this is set then anyone with the master password
// can create a non-admin account
masterPassword: 'foobarbaz',
dataPath: './data',
staticPath: './static',
staticUserPath: './user-static',
tlsKey: fs.readFileSync('tls/key.pem'),
tlsCert: fs.readFileSync('tls/cert.pem'),
tlsPeers: [
{
type: 'server', // server peers have full access to db
connect: {
host: 'localhost',
port: 4444,
},
cert: fs.readFileSync('tls/peers/server.localhost.pem')
},
{
type: 'lab', // lab peers have full access to db
description: "some computer",
cert: fs.readFileSync('tls/peers/lab.localhost.pem')
},
{
type: 'field', // field peers can't access lab inventory
description: "juul's laptop",
cert: fs.readFileSync('tls/peers/field.localhost.pem')
},
{
type: 'lab-device', // lab devices have no database access at all
description: "label printer",
cert: fs.readFileSync('tls/peers/lab-device.localhost.pem')
},
{
type: 'decapper', // lab devices have no database access at all
description: "Hamilton DeCapper",
cert: fs.readFileSync('tls/peers/decapper.localhost.pem')
}
],
loginToken: {
secret: "MY UNIQUE SECRET", // must be a server-unique secret
expiration: 14 // login token expiration in days
},
// If a user with this name doesn't exist
// then this user will be created as an admin
initialUser: {
name: "admin",
email: "[email protected]",
password: "dontpanic"
},
checkTimeEvery: 60 * 60, // how often to check time accuracy (in seconds)
ntpServers: [
{host: '0.pool.ntp.org', port: 123},
{host: '1.pool.ntp.org', port: 123},
{host: '2.pool.ntp.org', port: 123},
{host: '3.pool.ntp.org', port: 123}
],
// Prefix added to all non-GUID barcodes in this lab
// this must be lab-unique within the constellation of labs that share data
labBarcodePrefix: 'A',
// All data generated by this node will be associated with this lab name
lab: 'somelab',
// Device to use for webcam-based DataMatrix scanning
// Comment out if you don't have such a device
dataMatrixScanner: "/dev/video0",
// Where files posted to /upload are saved
uploadFilepath: path.join(__dirname, 'upload'),
// Settings related to label printing
labDevice: {
// Where label image files are stored.
// Relative to userFilePath
labelImageFilePath: path.join(__dirname, 'static', 'labels'),
// hostname where we should listen for printer client connections
// (this is optional: falls back to settings.hostname if not specified)
// serverHost: "localhost",
// port where we should listen for printer client connections
serverPort: 4200,
// path to the host ssh private key
hostKey: path.join(__dirname, 'labdevice', 'hostkey'),
// path to directory containing the public keys of authorized labdevice clients
clientKeys: path.join(__dirname, 'labdevice', 'client_keys')
},
// Where to log failed attempts to sign up or log in
attemptsLog: 'log/attempts.log',
// LigoLab rack scan submission endpoint
ligolab: {
host: "ligolab-hostname",
port: 443, // server port for https
basePath: "/LigoLabServer/WebHookServer", // URL path component
orderBasePath: "/LigoLabServer/WebHookServer" // URL path for creating test orders
},
// A Rimbaud REST API endpoint
rimbaud: {
host: 'example.com', // REST server
port: 443, // server port for https
basePath: '/rim-lab-rest', // where the web app is mounted
secretKey: '<your secret key>',
synchronizeOrders: 1200 // automatically sync order and sample ID assocications to rimbaud as they come into existance and re-try every this many seconds (only one peer in the renegade-lims network should be doing this)
},
// Settings relating to .eds file generating and parsing
eds: {
// Generated .eds files should have this SampleVolume
// set in tcprotocol.xml
sampleVolume: 30.0
}
};