<?php
require_once("class.restframework.php");
require_once("class.db.php");
$restapi = new RestFrameWork();
// only allow get method
$restapi->allow("get");
$db = new APIDB();
$connection = $db->dbConnection();
if ($db->inService()) {
    echo $restapi->Response(array("message" => "Database connection successful", "success" => true));
} else {
    echo $restapi->Response(array("message" => "Failed to connect to the database: " . $db->message, "success" => false), 400);
}
