Game-Jaming/Backend/CheckSetup.php

12 lines
415 B
PHP

<?php
header("Access-Control-Allow-Methods: GET");
header("Access-Control-Allow-Headers: X-Requested-With, Content-Type, Accept");
header('Content-Type: application/json;charset=UTF-8');
if(!file_exists('../config/database.json')){
echo json_encode(['data' => false]);
}elseif(0 === filesize('../config/database.json')){
echo json_encode(['data' => false]);
}else{
echo json_encode(['data' => true]);
}