Skip to content

Instantly share code, notes, and snippets.

@blogcacanid
Created June 23, 2020 13:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save blogcacanid/a485c5374a72044a19e8c693c16bed52 to your computer and use it in GitHub Desktop.
Save blogcacanid/a485c5374a72044a19e8c693c16bed52 to your computer and use it in GitHub Desktop.
setting.php Rest API Dengan JSON Web Token Slim 3
<?php
return [
'settings' => [
'displayErrorDetails' => true, // set to false in production
'addContentLengthHeader' => false, // Allow the web server to send the content-length header
// Renderer settings
'renderer' => [
'template_path' => __DIR__ . '/../templates/',
],
// Monolog settings
'logger' => [
'name' => 'slim-app',
'path' => isset($_ENV['docker']) ? 'php://stdout' : __DIR__ . '/../logs/app.log',
'level' => \Monolog\Logger::DEBUG,
],
// database
'db' => [
'host' => 'localhost',
'dbname' => 'slim3_rest_api_jwt',
'user' => 'root',
'pass' => 'j.fUjHyL',
'driver' => 'mysql',
],
// jwt settings
'jwt' => [
'secret' => 'supersecretkeyyoushouldnotcommittogithub'
]
],
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment