Skip to content

Commit

Permalink
update sandbox_api
Browse files Browse the repository at this point in the history
  • Loading branch information
Ethosa committed Jan 13, 2024
1 parent eee06be commit c9bb5ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/sandbox_api/src/main.nim
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ serve host, port:
var f = openAsync("website" / "index.html")
let data = await f.readAll()
f.close()
return data
req.answerHtml(data)

post "/[task:Task[m]]":
{.gcsafe.}:
Expand Down Expand Up @@ -150,7 +150,7 @@ serve host, port:
{.gcsafe.}:
if not dirExists("website"):
return %*{"response": "website not compiled"}
var f = openAsync("website" / file)
var f = openAsync("website" / "public" / file)
let data = await f.readAll()
f.close()
return data
Expand Down

0 comments on commit c9bb5ab

Please sign in to comment.