<?php
// Load tasks from the flat-file database (tasks.json)
$tasks = file_exists("tasks.json") ? json_decode(file_get_contents("tasks.json")) : [];
echo json_encode($tasks);
?>