diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2eea525 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.env \ No newline at end of file diff --git a/ENV_TEMPLATE b/ENV_TEMPLATE new file mode 100644 index 0000000..f77e5d7 --- /dev/null +++ b/ENV_TEMPLATE @@ -0,0 +1 @@ +APIKEY=123 diff --git a/config.php b/config.php index 5776db7..f28fb96 100644 --- a/config.php +++ b/config.php @@ -1,7 +1,11 @@ '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', - -]; +function getApi(){ + $api_key = getenv('APIKEY'); + if($api_key){ + return array('openai_api_key' => $api_key); + }else{ + return false; + } +} ?> \ No newline at end of file diff --git a/home.php b/home.php index e199301..3319270 100644 --- a/home.php +++ b/home.php @@ -1,26 +1,9 @@ - - - -
- -