Skip to content

Commit

Permalink
Allow base option to override current working directory
Browse files Browse the repository at this point in the history
  • Loading branch information
opengeek committed Oct 16, 2019
1 parent 242f69f commit 84b9f90
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions bin/endpoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@
try {
require_once __DIR__ . '/../src/bootstrap.php';

define('TELEPORT_BASE_PATH', rtrim(getcwd(), '/') . '/');

$options = array(
'debug' => $opt('debug'),
'verbose' => $opt('verbose', true)
Expand All @@ -87,6 +85,8 @@
}
}

define('TELEPORT_BASE_PATH', rtrim($opt('base', getcwd()), '/') . '/');

/** @var \Teleport\Beam\Endpoint $server */
$server = \Teleport\Beam\Endpoint::instance($options);
$server->run($arg(1, TELEPORT_BASE_PATH . 'profile/revo_22.profile.json'));
Expand Down
4 changes: 2 additions & 2 deletions bin/server.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@
try {
require_once __DIR__ . '/../src/bootstrap.php';

define('TELEPORT_BASE_PATH', rtrim(getcwd(), '/') . '/');

$options = array(
'debug' => $opt('debug'),
'verbose' => $opt('verbose', true)
Expand All @@ -87,6 +85,8 @@
}
}

define('TELEPORT_BASE_PATH', rtrim($opt('base', getcwd()), '/') . '/');

$server = \Teleport\Beam\HttpServer::instance($options);
$server->run($arg(1, 1337));

Expand Down

0 comments on commit 84b9f90

Please sign in to comment.