forked from Unleash/unleash-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
38 lines (33 loc) · 974 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
28
29
30
31
32
33
34
35
36
37
38
'use strict';
const DATABASE_URL = process.env.DATABASE_URL || 'postgres://unleash_user:passord@localhost:5432/unleash';
const SECRET = process.env.SECRET || 'secret';
const SHARED_SECRET = 'shared-secret';
const unleash = require('unleash-server');
// const googleAdminAuth = require('./google-auth-hook');
const azureAuthHook = require('./azure-auth-hook');
/* unleash.start({
databaseUrl: DATABASE_URL,
authentication: {
type: 'custom',
customAuthHandler: azureAuthHook,
},
server: {
enableRequestLogger: true,
baseUriPath: process.env.BASE_URI,
},
logLevel: 'info',
}).then(server => {
console.log(`Accepting requests on on http://localhost:${server.app.get('PORT')}`);
}) */
unleash.start({
databaseUrl: DATABASE_URL,
authentication: {
type: 'custom',
customAuthHandler: azureAuthHook,
},
server: {
enableRequestLogger: true,
baseUriPath: '',
},
logLevel: 'info',
});