import not working for router defined in different file
import jester
from cgi import decodeUrl
router extern:
get "/@testvalue":
resp decodeUrl(@"testvalue")
If I import this router from the main file, I get the following error:
Error: undeclared identifier: 'decodeUrl'
Using nim 0.19.0 and jester 0.4.1.
I haven't gone through the source in depth, but probably has something to do with closure. The example demonstrating closure only works for single routes: macro in single source file.
let test = "test"
router extern:
get "/":
resp test
also fails.
It's because Jester tries to be clever and moves your external router into the main router :/
Does that mean potentially reimplementing external routers?
Perhaps. But there is probably a way around this.
Any news?
Any news?