-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdefault.js
More file actions
122 lines (120 loc) · 5.24 KB
/
default.js
File metadata and controls
122 lines (120 loc) · 5.24 KB
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
const fs = require('fs');
const path = require('path');
const { Connection } = require('fielddb/api/corpus/Connection');
let deployTarget = process.env.NODE_ENV || 'localhost';
const PORT = process.env.PORT || process.env.HTTPS_PORT || null;
// backward compatible
if (deployTarget === 'test') {
deployTarget = 'beta';
}
Connection.knownConnections.thisserver = Connection.knownConnections[deployTarget];
Connection.knownConnections.test = Connection.knownConnections.beta;
Connection.knownConnections.testing = Connection.knownConnections.beta;
Connection.knownConnections.dyslexdisorth = Connection.knownConnections.thisserver.clone();
Connection.knownConnections.dyslexdisorth.userFriendlyServerName = 'DyslexDisorth';
Connection.knownConnections.dyslexdisorth.brandLowerCase = 'dyslexdisorth';
Connection.knownConnections.dyslexdisorth.serverLabel = 'dyslexdisorth';
Connection.knownConnections.ilanguagecloud = Connection.knownConnections.thisserver.clone();
Connection.knownConnections.ilanguagecloud.userFriendlyServerName = 'wordcloud.ca';
Connection.knownConnections.ilanguagecloud.brandLowerCase = 'ilanguagecloud';
Connection.knownConnections.ilanguagecloud.serverLabel = 'ilanguagecloud';
Connection.knownConnections.wordcloud = Connection.knownConnections.thisserver.clone();
Connection.knownConnections.wordcloud.userFriendlyServerName = 'wordcloud.ca';
Connection.knownConnections.wordcloud.brandLowerCase = 'wordcloud';
Connection.knownConnections.wordcloud.serverLabel = 'wordcloud';
Connection.knownConnections.kartulispeechrecognition = Connection.knownConnections.thisserver.clone();
Connection.knownConnections.kartulispeechrecognition.userFriendlyServerName = 'http://batumi.github.io';
Connection.knownConnections.kartulispeechrecognition.brandLowerCase = 'kartulispeechrecognition';
Connection.knownConnections.kartulispeechrecognition.serverLabel = 'kartulispeechrecognition';
Connection.knownConnections.georgiantogether = Connection.knownConnections.thisserver.clone();
Connection.knownConnections.georgiantogether.userFriendlyServerName = 'Learn X';
Connection.knownConnections.georgiantogether.brandLowerCase = 'georgiantogether';
Connection.knownConnections.georgiantogether.serverLabel = 'georgiantogether';
module.exports = {
sessionKey: 'uwotm8',
httpsOptions: {
key: fs.readFileSync(path.join(__dirname, '/fielddb_debug.key'), 'utf8'),
cert: fs.readFileSync(path.join(__dirname, '/fielddb_debug.crt'), 'utf8'),
port: PORT || '3183',
protocol: 'https://',
},
url: 'https://localhost:3183',
usersDbConnection: {
url: process.env.COUCHDB_URL || 'http://localhost:5984',
dbname: 'theuserscouch',
},
couchKeys: {
username: 'admin',
password: 'none',
},
externalOrigin: Connection.knownConnections.thisserver.authUrls[0],
sampleUsers: {
public: ['public'],
fieldlinguist: ['lingllama', 'teammatetiger'],
gamified: ['alakazou', 'valeriebilleentete'],
},
mailConnection: {
host: 'smtp.gmail.com',
port: 587,
secure: true, // use TLS
service: '',
auth: {
user: '',
pass: '',
},
},
newUserMailOptions: function newUserMailOptions() {
return {
from: 'none@localhost', // sender address
to: '', // list of receivers
subject: 'Welcome to localhost!', // Subject line
text: 'Your username is: insert_username', // plaintext // body
html: 'Your username is: insert_username',
};
},
welcomeToCorpusTeamMailOptions: function welcomeToCorpusTeamMailOptions() {
return {
from: 'none@localhost', // sender address
to: '', // list of receivers
subject: '[LingSync.org] Someone has granted you access to their corpus', // Subject line
text: "The new corpus's identifier is: insert_corpus_identifier", // plaintext // body
html: "The new corpus's identifier is: insert_corpus_identifier",
};
},
suspendedUserMailOptions: function suspendedUserMailOptions() {
return {
from: 'none@localhost', // sender address
to: '', // list of receivers
subject: 'New Temporary Password', // Subject line
text: 'Your username is: ', // plaintext // body
html: 'Your username is: ',
};
},
newUserMailOptionsPhophlo: function newUserMailOptionsPhophlo() {
return {
from: 'none@localhost', // sender address
to: '', // list of receivers
subject: 'Welcome to localhost!', // Subject line
text: 'Your username is: insert_username', // plaintext // body
html: 'Your username is: insert_username',
};
},
welcomeToCorpusTeamMailOptionsPhophlo: function welcomeToCorpusTeamMailOptionsPhophlo() {
return {
from: 'none@localhost', // sender address
to: '', // list of receivers
subject: '[LingSync.org] Someone has granted you access to their corpus', // Subject line
text: "The new corpus's identifier is: insert_corpus_identifier", // plaintext // body
html: "The new corpus's identifier is: insert_corpus_identifier",
};
},
suspendedUserMailOptionsPhophlo: function suspendedUserMailOptionsPhophlo() {
return {
from: 'none@localhost', // sender address
to: '', // list of receivers
subject: 'New Temporary Password', // Subject line
text: 'Your username is: ', // plaintext // body
html: 'Your username is: ',
};
},
};