Experiment with Listener Creation

This commit is contained in:
Jakob Friedl
2025-05-02 18:10:30 +02:00
parent f2fb926e4b
commit 0c39fda207
7 changed files with 131 additions and 0 deletions

19
server/agent.nim Normal file
View File

@@ -0,0 +1,19 @@
import prologue
# /agent/register
proc agentRegister*(ctx: Context) {.async.} =
let body: JsonNode = ctx.request.body().parseJson()
echo body
resp jsonResponse(body, Http200)
# /agent/{uuid}/tasks
proc agentTasks*(ctx: Context) {.async.} =
resp "<h1>Agent Tasks</h1>"
# /agent/{uuid}/results
proc agentResults*(ctx: Context) {.async.} =
resp "<h1>Agent Results</h1>"