From 7008d9d0bb08322780fef70cb1ba945964471f7a Mon Sep 17 00:00:00 2001 From: Clement Michaud Date: Sun, 29 Jan 2017 16:55:23 +0100 Subject: [PATCH] Add content in the configuration section of the README. Create a npm command called authelia --- README.md | 6 ++++++ package.json | 3 +++ src/index.js | 7 +++++++ 3 files changed, 16 insertions(+) mode change 100644 => 100755 src/index.js diff --git a/README.md b/README.md index 73ba0423..4da53c2a 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,12 @@ Paste the link in your browser and you should be able to reset the password. ## Documentation ### Configuration +The configuration of the server is defined in the file +**configuration.template.yml**. All the details are documented there. +You can specify another configuration file by giving it as first argument of +**Authelia**. + + authelia config.custom.yml ### API documentation There is a complete API documentation generated with diff --git a/package.json b/package.json index dc72d2a3..dd715cfe 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,9 @@ "version": "1.0.11", "description": "2-factor authentication server using LDAP as 1st factor and TOTP or U2F as 2nd factor", "main": "src/index.js", + "bin": { + "authelia": "src/index.js" + }, "scripts": { "test": "./node_modules/.bin/mocha --recursive test/unitary", "unit-test": "./node_modules/.bin/mocha --recursive test/unitary", diff --git a/src/index.js b/src/index.js old mode 100644 new mode 100755 index 4717ff2e..5d967c6f --- a/src/index.js +++ b/src/index.js @@ -1,3 +1,4 @@ +#! /usr/bin/env node process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0"; @@ -10,6 +11,12 @@ var nedb = require('nedb'); var YAML = require('yamljs'); var config_path = process.argv[2]; +if(!config_path) { + console.log('No config file has been provided.'); + console.log('Usage: authelia '); + process.exit(0); +} + console.log('Parse configuration file: %s', config_path); var yaml_config = YAML.load(config_path);