https://github.com/Ramy-Badr-Ahmed/swh-client
Revision 3233d06e85a9aa04fc362201f8154552d6b5b308 authored by Ramy-Badr-Ahmed on 24 July 2024, 16:59:37 UTC, committed by GitHub on 24 July 2024, 16:59:37 UTC
Fix typo in SWH_TOKEN_PROD
Tip revision: 3233d06e85a9aa04fc362201f8154552d6b5b308 authored by Ramy-Badr-Ahmed on 24 July 2024, 16:59:37 UTC
Merge pull request #1 from physikerwelt/patch-1
Merge pull request #1 from physikerwelt/patch-1
Tip revision: 3233d06
swhConfigs.php
<?php
/**
* @Author: Ramy-Badr-Ahmed
* @Desc: SWH API Client
* @Repo: https://github.com/Ramy-Badr-Ahmed/swh-client
*/
$envFile = __DIR__ . '/.env';
if (file_exists($envFile)) {
$envVariables = parse_ini_file($envFile);
foreach ($envVariables as $key => $value) {
putenv("$key=$value");
}
}
return [
'production' => [
'token' => getenv('SWH_TOKEN_PROD'),
'api-url' => getenv('SWH_API_URL_PROD'),
],
'staging' => [
'token' => getenv('SWH_TOKEN_STAGING'),
'api-url' => getenv('SWH_API_URL_STAGING')
]
];

Computing file changes ...