-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Separation of jester routes between different modules or files. #51
Comments
Thanks! |
sinatra can be used to define a subclass that acts as a container for all routes defined inside it. the subclass can then be mounted to a namespace, like "/foobar" and then all paths defined within it become relative to /foobar. can jester do anything like that? if i understood this issue correctly, I guess not.... |
This should be really easy to implement if we take most of the body out of the route macro and put it in a matcher macro without this line: https://github.com/dom96/jester/blob/master/jester.nim#L842 (and maybe a better way to name the matcher). Then the route macro can wrap that macro to get the matcher and add the serve call. This way you would be able to create multiple matchers which can then be baked into one manual matcher as seen in example 2. |
Implemented. See |
Hello:
I would like to divide a rest api project with jester into different src files:
Ex:
main.nim
another_part.nim
The current behaviour is that on running like this it will try to open two web servers with the same port.
The text was updated successfully, but these errors were encountered: