mirror of
https://github.com/bitinflow/expose.git
synced 2026-03-13 13:35:54 +00:00
wip
This commit is contained in:
@@ -24,6 +24,7 @@ use App\Http\RouteGenerator;
|
|||||||
use App\Server\Http\Router;
|
use App\Server\Http\Router;
|
||||||
use App\Server\SubdomainGenerator\RandomSubdomainGenerator;
|
use App\Server\SubdomainGenerator\RandomSubdomainGenerator;
|
||||||
use Clue\React\SQLite\DatabaseInterface;
|
use Clue\React\SQLite\DatabaseInterface;
|
||||||
|
use Phar;
|
||||||
use Ratchet\Server\IoServer;
|
use Ratchet\Server\IoServer;
|
||||||
use Ratchet\WebSocket\WsServer;
|
use Ratchet\WebSocket\WsServer;
|
||||||
use React\Socket\Server;
|
use React\Socket\Server;
|
||||||
@@ -205,7 +206,14 @@ class Factory
|
|||||||
{
|
{
|
||||||
app()->singleton(DatabaseInterface::class, function() {
|
app()->singleton(DatabaseInterface::class, function() {
|
||||||
$factory = new \Clue\React\SQLite\Factory($this->loop);
|
$factory = new \Clue\React\SQLite\Factory($this->loop);
|
||||||
return $factory->openLazy(config('expose.admin.database', ':memory:'));
|
|
||||||
|
$options = ['worker_command' => Phar::running(false) ? Phar::running(false) . ' --sqlite-worker' : null];
|
||||||
|
|
||||||
|
return $factory->openLazy(
|
||||||
|
config('expose.admin.database', ':memory:'),
|
||||||
|
null,
|
||||||
|
$options,
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
|
|||||||
BIN
builds/expose
BIN
builds/expose
Binary file not shown.
@@ -14,19 +14,20 @@
|
|||||||
"repositories": [
|
"repositories": [
|
||||||
{
|
{
|
||||||
"type": "vcs",
|
"type": "vcs",
|
||||||
"url": "https://github.com/pestphp/pest"
|
"url": "https://github.com/seankndy/reactphp-sqlite"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^7.2.5",
|
"php": "^7.2.5",
|
||||||
"ext-json": "*"
|
"ext-json": "*",
|
||||||
|
"padraic/phar-updater": "^1.0.6"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"nikic/php-parser": "^4.4",
|
"nikic/php-parser": "^4.4",
|
||||||
"cboden/ratchet": "^0.4.2",
|
"cboden/ratchet": "^0.4.2",
|
||||||
"clue/block-react": "^1.3",
|
"clue/block-react": "^1.3",
|
||||||
"clue/buzz-react": "^2.7",
|
"clue/buzz-react": "^2.7",
|
||||||
"clue/reactphp-sqlite": "^1.0",
|
"clue/reactphp-sqlite": "dev-modular-worker-for-phar-support",
|
||||||
"guzzlehttp/guzzle": "^6.5",
|
"guzzlehttp/guzzle": "^6.5",
|
||||||
"guzzlehttp/psr7": "dev-master as 1.6.1",
|
"guzzlehttp/psr7": "dev-master as 1.6.1",
|
||||||
"illuminate/http": "5.8.*|^6.0|^7.0",
|
"illuminate/http": "5.8.*|^6.0|^7.0",
|
||||||
|
|||||||
801
composer.lock
generated
801
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -131,7 +131,11 @@ return [
|
|||||||
| if you enable authentication token validation.
|
| if you enable authentication token validation.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
'database' => base_path('database/expose.db'),
|
'database' => implode(DIRECTORY_SEPARATOR, [
|
||||||
|
$_SERVER['HOME'] ?? __DIR__,
|
||||||
|
'.expose',
|
||||||
|
'expose.db'
|
||||||
|
]),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|||||||
10
expose
10
expose
@@ -1,6 +1,8 @@
|
|||||||
#!/usr/bin/env php
|
#!/usr/bin/env php
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use function Clue\React\SQLite\runWorker;
|
||||||
|
|
||||||
define('LARAVEL_START', microtime(true));
|
define('LARAVEL_START', microtime(true));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -17,6 +19,14 @@ define('LARAVEL_START', microtime(true));
|
|||||||
|
|
||||||
$autoloader = require file_exists(__DIR__.'/vendor/autoload.php') ? __DIR__.'/vendor/autoload.php' : __DIR__.'/../../autoload.php';
|
$autoloader = require file_exists(__DIR__.'/vendor/autoload.php') ? __DIR__.'/vendor/autoload.php' : __DIR__.'/../../autoload.php';
|
||||||
|
|
||||||
|
$options = getopt(null, [
|
||||||
|
'sqlite-worker',
|
||||||
|
]);
|
||||||
|
if (isset($options['sqlite-worker'])) {
|
||||||
|
runWorker($_SERVER['argv'][2] ?? null);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
$app = require_once __DIR__.'/bootstrap/app.php';
|
$app = require_once __DIR__.'/bootstrap/app.php';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user