Support a .env file, include a .env.example
This commit is contained in:
parent
ecf6161040
commit
b2c061b842
3
.env.example
Normal file
3
.env.example
Normal file
@ -0,0 +1,3 @@
|
||||
REDMINE_URL="https://hq.example.com"
|
||||
REDMINE_API_KEY="abc123"
|
||||
DEBUG_MODE=FALSE
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
/vendor/
|
||||
/data/*.csv
|
||||
.env
|
||||
|
@ -2,7 +2,12 @@
|
||||
<?php
|
||||
|
||||
require_once 'vendor/autoload.php';
|
||||
$client = new Redmine\Client('https://hq.megaphonetech.com', '965fddd60cfb5690d15542944998058224d7289f');
|
||||
|
||||
// Load the .env file
|
||||
$dotenv = new Dotenv\Dotenv(__DIR__);
|
||||
$dotenv->load();
|
||||
|
||||
$client = new Redmine\Client(getenv('REDMINE_URL'), getenv('REDMINE_API_KEY'));
|
||||
$client->setCheckSslCertificate(true);
|
||||
|
||||
$limit = 100;
|
||||
|
Loading…
Reference in New Issue
Block a user