2019-05-19 08:34:20 +02:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
// const unleash = require('unleash-server');
|
|
|
|
const unleash = require('../lib/server-impl.js');
|
|
|
|
|
2019-05-19 08:38:07 +02:00
|
|
|
const enableKeycloak = require('./keycloak-auth-hook');
|
2019-05-19 08:34:20 +02:00
|
|
|
|
|
|
|
unleash
|
|
|
|
.start({
|
|
|
|
databaseUrl: 'postgres://unleash_user:passord@localhost:5432/unleash',
|
|
|
|
adminAuthentication: 'custom',
|
2019-05-19 08:38:07 +02:00
|
|
|
preRouterHook: enableKeycloak,
|
2019-05-19 08:34:20 +02:00
|
|
|
})
|
|
|
|
.then(server => {
|
2020-04-14 22:29:11 +02:00
|
|
|
// eslint-disable-next-line no-console
|
2019-05-19 08:34:20 +02:00
|
|
|
console.log(
|
2020-04-14 22:29:11 +02:00
|
|
|
`Unleash started on http://localhost:${server.app.get('port')}`,
|
2019-05-19 08:34:20 +02:00
|
|
|
);
|
|
|
|
});
|