Changeset 1e37648 for src/webservice/htdocs/index.php
- Timestamp:
- Aug 28, 2015, 3:29:08 PM (11 years ago)
- Branches:
- master
- Children:
- b858e6f
- Parents:
- 851179e
- File:
-
- 1 edited
-
src/webservice/htdocs/index.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/webservice/htdocs/index.php
r851179e r1e37648 46 46 array 47 47 ( 48 "mode" => "production"48 "mode" => $settings->getConfig("mode"), 49 49 ) 50 50 ); 51 $app->setName(" siweather");51 $app->setName("SiWeather Webservice"); 52 52 53 53 // Only invoked if mode is "production" 54 54 $app->configureMode('production', function () use ($app) { 55 55 $app->config(array( 56 'log.enable' => true, 57 'debug' => false 56 "log.enable" => true, 57 "log.level" => \Slim\Log::WARN, 58 "debug" => false, 58 59 )); 59 60 }); … … 61 62 $app->configureMode('development', function () use ($app) { 62 63 $app->config(array( 63 'log.enable' => false, 64 'debug' => true 64 "log.enable" => true, 65 "log.level" => \Slim\Log::DEBUG, 66 "debug" => true 65 67 )); 66 68 }); 67 69 68 // $app->notFound(function () use ($app) { 69 // $app->render(getConfig("webserviceBaseUrl")+ "404.html"); 70 // }); 70 $app->notFound(function () use ($app) { 71 $html = ""; 72 if($app->config("debug")){ 73 ob_start(); 74 phpinfo( INFO_VARIABLES ^ INFO_ENVIRONMENT ); 75 $html = ob_get_contents(); 76 ob_end_clean(); 77 } 78 $app->render("404.php", array("dump" => $html)); 79 }); 71 80 72 // $app->get("/stations", "stations"); 81 $app->get("/setup", function () use ($app){ 82 $app->render("setup.php"); 83 }); 84 73 85 $app->get("/stations", "stations"); 74 86 $app->get("/stations/:uuid", function ($uuid){ 75 87 echo "stations 123"; 76 88 }); 89 90 91 77 92 $app->run(); 78 93
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/siweather/chrome/site/your_project_logo.png)