From 8599ec37394be21ba5a8a9b7547e86e77b49c8d7 Mon Sep 17 00:00:00 2001 From: Loic LE PENN Date: Mon, 24 Jul 2017 17:11:40 +0200 Subject: [PATCH] Update config.md I propose to add a section that define all the key available in global configuration file, because I get some trouble to find some key during my dev. Please checks and add keys I could forget before release theses changes if you wish to. --- 2.0/docs/configs/config.md | 62 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/2.0/docs/configs/config.md b/2.0/docs/configs/config.md index a202247f..9cb389e0 100644 --- a/2.0/docs/configs/config.md +++ b/2.0/docs/configs/config.md @@ -141,6 +141,68 @@ let host = drop.config["server" "host"]?.string ?? "0.0.0.0" // will load 9000, or environment variable port. let port = drop.config["server", "port"]?.int ?? 9000 ``` +## Configuration file Options + +#### `droplet.json` +```JSON +{ + "server": "engine", + "client": "engine", + "console": "terminal", + "log": "console", + "hash": "crypto", + "cipher": "crypto", + "middleware": [ + "error", + "date", + "file" + ], + "commands": [ + "prepare" + ] +} +``` + +#### `server.json` +```JSON +{ + "port": "$PORT:8080", + "host": "0.0.0.0", + "securityLayer": "none" +} +``` + +#### `fluent.json` +```JSON +{ + "driver": "memory", + "keyNamingConvention": "snake_case", + "migrationEntityName": "fluent", + "pivotNameConnector": "_", + "autoForeignKeys": true, + "defaultPageKey": "page", + "defaultPageSize": 10, + "log": false, + "maxConnections":10 +} +``` + +#### `crypto.json` +```JSON +{ + "hash": { + "method": "sha256", + "encoding": "hex", + "key": "0000000000000000" + }, + + "cipher": { + "method": "aes256", + "encoding": "base64", + "key": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=" + } +} +``` ## COMMAND LINE