Initial project import

This commit is contained in:
Agila Forge Importer committed 2026-07-13 15:20:32 +00:00
commit 23f2d29e32
11957 files changed
+1754577

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
module main
fn home_controller() ![]u8 {
response := 'HTTP/1.1 200 OK\r\nContent-Type: text/plain\r\nContent-Length: 13\r\n\r\nHello, World!'
return response.bytes()
}
fn get_user_controller(id string) ![]u8 {
body := 'User ID: ${id}'
content_length := body.len
response := 'HTTP/1.1 200 OK\r\nContent-Type: text/plain\r\nContent-Length: ${content_length}\r\n\r\n${body}'
return response.bytes()
}
fn create_user_controller() ![]u8 {
body := 'User created successfully'
content_length := body.len
response := 'HTTP/1.1 201 Created\r\nContent-Type: text/plain\r\nContent-Length: ${content_length}\r\n\r\n${body}'
return response.bytes()
}
fn not_found_response() ![]u8 {
body := '404 Not Found'
content_length := body.len
response := 'HTTP/1.1 404 Not Found\r\nContent-Type: text/plain\r\nContent-Length: ${content_length}\r\n\r\n${body}'
return response.bytes()
}