From a5a030eba9f36b91587486fe07d382fb57ddfa5f Mon Sep 17 00:00:00 2001 From: Kevin Kandlbinder Date: Tue, 7 Mar 2023 15:24:34 +0100 Subject: [PATCH] Add .env file --- .env.dist | 6 ++++++ .gitignore | 6 +++++- .idea/calapi.iml | 4 +++- cmd/root.go | 4 ++-- 4 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 .env.dist diff --git a/.env.dist b/.env.dist new file mode 100644 index 0000000..8c5fbff --- /dev/null +++ b/.env.dist @@ -0,0 +1,6 @@ +CALAPI_DEVELOPMENT=0 +CALAPI_DATA_DIRECTORY=./data +CALAPI_AUTH__TYPE=GHOST +CALAPI_AUTH__SECRET=CH4NG3_M3 +CALAPI_AUTH__ANONYMOUS_READ=1 +CALAPI_AUTH__GHOST__BASE_URL=https://demo.ghost.io/ghost \ No newline at end of file diff --git a/.gitignore b/.gitignore index 2603887..c7cec58 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,8 @@ /calapi.exe /data -/download \ No newline at end of file +/download + +.env +.env.* +!.env.dist \ No newline at end of file diff --git a/.idea/calapi.iml b/.idea/calapi.iml index 5e764c4..2ec9634 100644 --- a/.idea/calapi.iml +++ b/.idea/calapi.iml @@ -2,7 +2,9 @@ - + + + diff --git a/cmd/root.go b/cmd/root.go index 8ef3d65..e9a67a4 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -34,8 +34,8 @@ func init() { viper.SetDefault("auth.type", "GHOST") viper.SetDefault("auth.secret", "hunter2") viper.SetDefault("auth.anonymous_read", true) - viper.SetDefault("auth.ghost.base_url", "https://content.hhga.1in9.net/ghost") - viper.SetDefault("auth.ghost.limit_to_roles", nil) + viper.SetDefault("auth.ghost.base_url", "https://demo.ghost.io/ghost") + //viper.SetDefault("auth.ghost.limit_to_roles", nil) viper.AutomaticEnv()