1
mirror of https://github.com/jakejarvis/spoons.git synced 2025-04-26 06:35:22 -04:00

use environment variables for sensitive config info

This commit is contained in:
Jake Jarvis 2017-07-16 13:19:00 -04:00
parent 24354e198b
commit 8af377fdb7
2 changed files with 5 additions and 6 deletions

2
.gitignore vendored
View File

@ -2,7 +2,5 @@
Thumbs.db
.DS_Store
config.php
vendor/
.env

View File

@ -1,8 +1,9 @@
<?php
/* site config */
$site_url = "https://idspoons.herokuapp.com";
$site_password = "asdf1234";
$site_url = getenv('SITE_URL'); // ex: https://idspoons.herokuapp.com (no trailing slash)
$site_password = getenv('SITE_PASSWORD');
/* database config */
if(isset(getenv('JAWSDB_URL'))) {
$db_parts = parse_url(getenv('JAWSDB_URL'));
@ -14,8 +15,8 @@
} else {
$db_host = "localhost";
$db_port = 8889;
$db_user = "root";
$db_pass = "lol";
$db_user = "lol";
$db_pass = "yourpassword";
$db_name = "spoons";
}