diff --git a/dagger.nimble b/dagger.nimble index 9a4e8d9b..e83600c0 100644 --- a/dagger.nimble +++ b/dagger.nimble @@ -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: diff --git a/experiments/localstore.nim b/experiments/localstore.nim index ad34ed00..757be605 100644 --- a/experiments/localstore.nim +++ b/experiments/localstore.nim @@ -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