move connections to the bootstrap

This commit is contained in:
ghost 2023-09-14 20:38:42 +03:00
parent 4135e70b62
commit bf759f9dd7
13 changed files with 25 additions and 151 deletions

View file

@ -3,30 +3,6 @@
// Bootstrap
require_once __DIR__ . '/../config/bootstrap.php';
// Connect Sphinx
try {
$sphinx = new Sphinx(SPHINX_HOST, SPHINX_PORT);
} catch(Exception $e) {
var_dump($e);
exit;
}
// Connect database
try {
$db = new Database(DB_HOST, DB_PORT, DB_NAME, DB_USERNAME, DB_PASSWORD);
} catch (Exception $e) {
var_dump($e);
exit;
}
// Define response
$response = (object)
[