From 2685c4c31ffad356a73f1e0ec69606b6136bca47 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Wed, 2 Apr 2025 16:19:57 -0400 Subject: Move HTML into script --- examples/http-server/http-server.tm | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'examples/http-server/http-server.tm') diff --git a/examples/http-server/http-server.tm b/examples/http-server/http-server.tm index 4cdbda4e..f7338b91 100644 --- a/examples/http-server/http-server.tm +++ b/examples/http-server/http-server.tm @@ -106,17 +106,7 @@ enum RouteEntry(ServeFile(file:Path), Redirect(destination:Text)): func respond(entry:RouteEntry, request:HTTPRequest -> HTTPResponse): when entry is ServeFile(file): body := if file:can_execute(): - output := Command(Text(file)):get_output()! - " - - - $file - -

$file program output

-
$output
- - - " + Command(Text(file)):get_output()! else: file:read()! return HTTPResponse(body, content_type=_content_type(file)) -- cgit v1.2.3