forked from openstad/openstad-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
27 lines (22 loc) · 936 Bytes
/
index.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
let appInsights = require('applicationinsights');
const openstadCms = require('@openstad/cms');
require('dotenv').config();
if (process.env.APPLICATIONINSIGHTS_CONNECTION_STRING) {
console.log(`Staring Application Insights`)
appInsights.setup()
.setAutoCollectRequests(true)
.setAutoCollectPerformance(true)
.setAutoCollectExceptions(true)
.setAutoCollectDependencies(true)
.setAutoDependencyCorrelation(true)
.setUseDiskRetryCaching(true);
appInsights.defaultClient.config.samplingPercentage = process.env.APPLICATIONINSIGHTS_SAMPLING_PERCENTAGE ? parseInt(process.env.APPLICATIONINSIGHTS_SAMPLING_PERCENTAGE) : 100;
appInsights.start();
}
var apos = openstadCms.site({
bundles: ['@openstad/cms'],
// See lib/modules for basic project-level configuration of our modules
// responsible for serving static assets, managing page templates and
// configuring user accounts.
modules: { }
});