Skip to content

Commit

Permalink
static example use static dir path
Browse files Browse the repository at this point in the history
  • Loading branch information
bung87 committed Jan 16, 2024
1 parent b1d22df commit 7e48c18
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion benchmark/simple_resp.nim.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@
-d:release
-d:GzipEnable=false
--opt:speed
-d:danger
# -d:threadsafe
--threads:off
1 change: 0 additions & 1 deletion examples/static.nim
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import scorper

when isMainModule:
# cd `example` dir first then run `nim c -r static.nim`
let r = newRouter[ScorperCallback]()
r.addRoute(serveStatic, "get", "/static/*$")
let address = "127.0.0.1:8888"
Expand Down
4 changes: 3 additions & 1 deletion examples/static.nims
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
putEnv("StaticDir","./static")
import os

putEnv("StaticDir", currentSourcePath.parentDir / "static")

0 comments on commit 7e48c18

Please sign in to comment.