Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Raeen committed Mar 25, 2021
1 parent 0e90453 commit b04c67c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions core/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ class Application
public File $file;
public DB $db;
public static Application $app;
public function __construct($rootPath)
public function __construct()
{
$dotenv = Dotenv::createImmutable(dirname(__DIR__));
$dotenv->load();
self::$ROOT_DIR = dirname($rootPath);
self::$ROOT_DIR = dirname(__DIR__);
self::$app = $this;
$this->request = new Request();
$this->response = new Response();
Expand Down
2 changes: 1 addition & 1 deletion public/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use app\core\Application;

require_once __DIR__ . "/../vendor/autoload.php";
$app = new Application(__DIR__);
$app = new Application();
$router = $app->router;
//Routes
$router->post('/api', 'Api');
Expand Down

0 comments on commit b04c67c

Please sign in to comment.