authelia/scripts/authelia-scripts-serve
Clement Michaud 76fa325f08 [BREAKING] Create a suite for kubernetes tests.
Authelia client uses hash router instead of browser router in order to work
with Kubernetes nginx-ingress-controller. This is also better for users having
old browsers.

This commit is breaking because it requires to change the configuration of the
proxy to include the # in the URL of the login portal.
2019-03-16 00:13:27 +01:00

26 lines
722 B
JavaScript
Executable File

#!/usr/bin/env node
var program = require('commander');
var spawn = require('child_process').spawn;
let config;
program
.description('Run Authelia server with a custom configuration file. This is an alternative to suites in the case the environment is already set up.')
.arguments('[config_file]', 'Configuration file to run Authelia with.')
.action((configArg) => config = configArg)
.parse(process.argv);
if (!config) {
config = 'config.yml'; // set default config file.;
}
const server = spawn('/usr/bin/env', ['node', 'dist/server/src/index.js', config]);
server.stdout.pipe(process.stdout);
server.stderr.pipe(process.stderr);
server.on('exit', function(statusCode) {
process.exit(statusCode);
});