-
Notifications
You must be signed in to change notification settings - Fork 1
/
app.js
29 lines (25 loc) · 872 Bytes
/
app.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
// Run with app.exe --port=3000 --secret=ed1bb543-8767-4ab3-ad94-ad6db1c225b5
var port = 3000;
var secret = "";
var debugLogEnabled = false;
process.argv.forEach((val, index) => {
if (val.startsWith('--port='))
port = parseInt(val.split('=')[1]);
else if (val.startsWith('--secret='))
secret = val.split('=')[1];
else if (val === '--verbose')
debugLogEnabled = true;
});
console.log('Running Exchange Web Service Proxy on http://localhost:' + port);
if (debugLogEnabled) {
console.log(' => Verbose Logging active');
}
if (!secret) {
console.log(' => Using default secret: 9e633a7256ff4073821f4890fafd29f5');
secret = '9e633a7256ff4073821f4890fafd29f5';
} else {
console.log(' => Using provided secret: ' + secret);
}
var app = require('./express-app');
app.configureApp(secret, debugLogEnabled);
app.listen(port);