[wip] compile in build dir
This commit is contained in:
parent
15b4694655
commit
8ea2a9429a
|
@ -58,6 +58,7 @@ task localstore, "Build localstore experiment":
|
|||
|
||||
common_opts =
|
||||
" --define:ssl" &
|
||||
" --out:build/localstore" &
|
||||
" --threads:on" &
|
||||
" --tlsEmulation:off"
|
||||
|
||||
|
@ -86,7 +87,7 @@ task localstore, "Build localstore experiment":
|
|||
(when maxRequestBodySize != "": " --define:maxRequestBodySize=" & maxRequestBodySize else: "") &
|
||||
(when port != "": " --define:port=" & port else: "") &
|
||||
" experiments/localstore.nim",
|
||||
"experiments/localstore"
|
||||
"build/localstore"
|
||||
]
|
||||
|
||||
for command in commands:
|
||||
|
|
|
@ -52,6 +52,9 @@ proc scheduleStop(runner: TaskRunner, s: Duration) {.async.} =
|
|||
await runner.stop
|
||||
|
||||
proc main() {.async.} =
|
||||
const destDir = currentSourcePath.parentDir.parentDir / "build" / "files"
|
||||
createDir(destDir)
|
||||
|
||||
var
|
||||
localstoreArg = LocalstoreArg()
|
||||
runner = TaskRunner.new
|
||||
|
@ -63,7 +66,7 @@ proc main() {.async.} =
|
|||
let
|
||||
request = r.tryGet
|
||||
filename = ($request.uri).split("/")[^1]
|
||||
destPath = currentSourcePath.parentDir / "files" / filename
|
||||
destPath = destDir / filename
|
||||
(rfd, wfd) = createAsyncPipe()
|
||||
writer = wfd.fromPipe
|
||||
|
||||
|
|
Loading…
Reference in New Issue