move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
<?php
header('Content-Type: application/json; charset=utf-8');
$file = "example-cinema.json";
if (isset($_GET['reset']) && $_GET['reset']) {
$resetfile = "test-data.json";
file_put_contents($file, file_get_contents($resetfile));
}
if ($_SERVER['REQUEST_METHOD'] == 'PUT') {
file_put_contents($file, file_get_contents("php://input"));
echo json_encode(array("result" => "OK"));
} else {
echo file_get_contents($file);
}
?>