This repository has been archived by the owner on Nov 2, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
style(EnvironmentLoader): Use Dotenv to load Loads environment variables
1. Use Dotenv\Dotenv to load Loads environment variables from `.env` automagically. 2. ucfirst Folder of `Framework`
- Loading branch information
Showing
81 changed files
with
240 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/usr/bin/env php | ||
<?php | ||
/** | ||
* RidPT - Yet Another Private Bittorrent Service | ||
* | ||
* @package RidPT | ||
* @author Rhilip <rhilipruan@gmail.com> | ||
*/ | ||
|
||
define('RIDPT_START', microtime(true)); | ||
|
||
/* | ||
* -------------------------------------------------------------------------- | ||
* Register The Auto Loader | ||
* -------------------------------------------------------------------------- | ||
* | ||
* Composer provides a convenient, automatically generated class loader for | ||
* our application. We just need to utilize it! We'll simply require it | ||
* into the script here so that we don't have to worry about manual | ||
* loading any of our classes later on. It feels great to relax. | ||
* | ||
*/ | ||
require __DIR__ . '/vendor/autoload.php'; | ||
|
||
/* | ||
* -------------------------------------------------------------------------- | ||
* Check Environment of PHP | ||
* -------------------------------------------------------------------------- | ||
*/ | ||
if (!PHP_SAPI === 'cli') | ||
exit('Run in cli like: `php rid-httpd service start`.'); | ||
|
||
/* | ||
* -------------------------------------------------------------------------- | ||
* Load Environment variables | ||
* -------------------------------------------------------------------------- | ||
*/ | ||
$dotenv = Dotenv\Dotenv::create(__DIR__); | ||
$dotenv->load(); | ||
|
||
/* | ||
* -------------------------------------------------------------------------- | ||
* Start Swoole Server | ||
* -------------------------------------------------------------------------- | ||
*/ | ||
$config = require __DIR__ . '/apps/config/httpd.php'; | ||
$exitCode = (new Rid\Console\Application($config))->run(); | ||
exit($exitCode); |