mirror of
https://github.com/locomotivemtl/locomotive-boilerplate.git
synced 2026-01-15 00:55:08 +08:00
Minor config fixes
This commit is contained in:
@@ -1,51 +1,44 @@
|
||||
{
|
||||
"project_name":"Boilerplate",
|
||||
|
||||
"databases":{
|
||||
"local":{
|
||||
"database":"boilerplate",
|
||||
"username":"root",
|
||||
"password":""
|
||||
},
|
||||
"lab":{
|
||||
"database":"",
|
||||
"username":"",
|
||||
"password":""
|
||||
},
|
||||
"live":{
|
||||
"database":"",
|
||||
"username":"",
|
||||
"password":""
|
||||
}
|
||||
},
|
||||
"default_database":"local",
|
||||
|
||||
"languages":{
|
||||
"fr":{
|
||||
"active":true
|
||||
},
|
||||
"en":{
|
||||
"active":true
|
||||
}
|
||||
},
|
||||
"default_language":"fr",
|
||||
|
||||
"modules":{
|
||||
"admin":{},
|
||||
"cms":{},
|
||||
"newsletter":{},
|
||||
"boilerplate":{}
|
||||
},
|
||||
|
||||
"objects":{
|
||||
|
||||
},
|
||||
|
||||
"apis":{
|
||||
|
||||
},
|
||||
|
||||
"url_options":{
|
||||
"use_rewrite":true
|
||||
}
|
||||
}
|
||||
"project_name": "Boilerplate",
|
||||
"databases": {
|
||||
"local": {
|
||||
"database": "gdfg",
|
||||
"username": "root",
|
||||
"password": ""
|
||||
},
|
||||
"lab": {
|
||||
"database": "",
|
||||
"username": "",
|
||||
"password": ""
|
||||
},
|
||||
"live": {
|
||||
"database": "",
|
||||
"username": "",
|
||||
"password": ""
|
||||
}
|
||||
},
|
||||
"default_database": "local",
|
||||
"languages": {
|
||||
"fr": {
|
||||
"active": true
|
||||
},
|
||||
"en": {
|
||||
"active": true
|
||||
}
|
||||
},
|
||||
"default_language": "fr",
|
||||
"modules": {
|
||||
"admin": [],
|
||||
"cms": [],
|
||||
"newsletter": [],
|
||||
"boilerplate": []
|
||||
},
|
||||
"objects": [],
|
||||
"apis": [],
|
||||
"url_options": {
|
||||
"use_rewrite": true
|
||||
},
|
||||
"debug":{
|
||||
"active":false
|
||||
}
|
||||
}
|
||||
5
project-x/config/config.local.json
Normal file
5
project-x/config/config.local.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"debug":{
|
||||
"active":true
|
||||
}
|
||||
}
|
||||
@@ -7,16 +7,27 @@
|
||||
error_reporting(E_ALL & ~E_STRICT);
|
||||
ini_set('display_errors', true);
|
||||
|
||||
// Environment defaults
|
||||
date_default_timezone_set('America/Montreal');
|
||||
|
||||
|
||||
// Main Charcoal include. This is where the Charcoal autoloader is defined.
|
||||
include __DIR__.'/../charcoal/charcoal.php';
|
||||
|
||||
// JSON Configuration
|
||||
Charcoal::add_config(__DIR__.'/config.json');
|
||||
$application_env = Charcoal::application_env();
|
||||
if(file_exists(__DIR__ . '/config.'.$application_env.'.json')) {
|
||||
Charcoal::add_config(__DIR__ . '/config.'.$application_env.'.json');
|
||||
}
|
||||
|
||||
// Environment defaults
|
||||
date_default_timezone_set('America/Montreal');
|
||||
|
||||
// Configuration overwrite
|
||||
Charcoal::$config['ROOT'] = realpath(__DIR__).'/../';
|
||||
Charcoal::$config['URL'] = 'http://'.$_SERVER['HTTP_HOST'].'/';
|
||||
if(isset($_SERVER['HTTP_HOST'])) {
|
||||
Charcoal::$config['URL'] = 'http://'.$_SERVER['HTTP_HOST'].'/';
|
||||
}
|
||||
else {
|
||||
Charcoal::$config['URL'] = 'http://localhost/';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user