C:\Users\\\nimdash_hold\experiments\scorpertest.nim(19, 4) template/generic instantiation of `addRoute` from here
C:\Users\\.nimble\pkgs\scorper-1.0.13\scorper\http\routermacros.nim(12, 15) Error: attempting to call undeclared routine: 'hasCustomPragma'
import scorper
const port{.intdefine.} = 8888
when isMainModule:
type AsyncCallback = proc (request: Request): Future[void] {.closure, gcsafe.}
proc handler(req: Request) {.route("get","/one"),async.} = discard
proc handler2(req: Request) {.route(["get","post"],"/multi"),async.} = discard
let r = newRouter[AsyncCallback]()
r.addRoute(handler)
r.addRoute(handler2)
const address = "127.0.0.1:" & $port
const flags = {ReuseAddr}
var server = newScorper(address, r, flags)
server.start()
waitFor server.join()
Seems to raise error at compile time.