-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
35 lines (29 loc) · 953 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
30
31
32
33
34
35
const fs = require('fs');
const path = require('path');
if (fs.existsSync(__dirname + '/.env')) {
const env = require('node-env-file');
env(__dirname + '/.env');
} else if (fs.existsSync(__dirname + '/env-prd')) {
const env = require('node-env-file');
env(__dirname + '/env-prd');
}
const { AbbottFramework } = require('@abbott-platform/abbott-framework');
const AppContext = require('./appContext');
var abbottConfig = {
botName: 'abbott-platform-info-botapp',
port: process.env.PORT || 3000,
platforms: require('./config/platforms'),
nlp: require('./config/nlp'),
webserver: {
baseRoutes: [
path.join(__dirname, 'routes/health_check')
]
}
};
const appContext = new AppContext();
const abbottFramework = new AbbottFramework(abbottConfig, appContext);
let version = process.env.CI_VERSION || 'x';
abbottFramework.start()
.then(() => {
console.log(`Abbott Framework Initialized! (1.0.${version})`);
});