// init register Register::init(); // start response Response::start(true); // true for debug // upload project if (Request::is_type('upload')) { if ($result = Project::upload()) { Response::exit_with($result); } else { Response::exit_with(['error' => 'Error uploading file']); } } // list projects if (Request::is_type('list')) { if ($result = Project::getlist()) { Response::exit_with($result); } else { Response::exit_with(['error' => 'Error fetching projects']); } } // list projects if (Request::is_type('load', ['filename'])) { if ($result = Project::getproject()) { Response::exit_with($result); } else { Response::exit_with(['error' => 'Error fetching projects']); } } // save project if (Request::is_type('save', ['file', 'filename'])) {