Skip to content
Snippets Groups Projects
Commit 305a6b4b authored by Jakob Moser's avatar Jakob Moser
Browse files

Draft backend

parent 4c482852
No related branches found
No related tags found
1 merge request!1Add backend in PHP, write proper architecture documentation
RewriteEngine on
RewriteRule services$ /api/v1/services.php
<?php
// TODO Replace this with actual true data
$services = [
array(
"name" => "Website",
"host" => "fachschaft.cl.uni-heidelberg.de",
"status" => "up",
"category" => "public"
),
array(
"name" => "Tickets",
"host" => "tickets.cl.uni-heidelberg.de",
"status" => "up",
"category" => "public"
),
];
// The browser expects to see a Content-Type indication in the HTTP headers, so we
// send one. If we hadn't written this, the content type would be text/html.
header("Content-Type: application/json; charset=utf-8");
// Everything that is written using `echo` is sent to the client (i.e. the browser)
echo json_encode($services);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment