Skip to content
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

Missing documentation #255

Open
mildred opened this issue Aug 4, 2020 · 2 comments
Open

Missing documentation #255

mildred opened this issue Aug 4, 2020 · 2 comments

Comments

@mildred
Copy link

mildred commented Aug 4, 2020

There is very little information about how jester works, in particular how route patterns work. in particular:

  • is the first route pattern that matches is blocking all subsequent patterns?
  • is there a else pattern allowing to catch all requests and provide a 404 error
  • how to handle the request and build the response in another function and call it from the router block
  • how to include a route block inside a function and nest them in sub-functions

I failed to find an answer to these questions and I fail to see how the router block can help be since I can't use it.

@ThomasTJdev
Copy link
Contributor

  1. Yes. First pattern rules.

  2. Yes, at the bottom of your routes:

routes:
  [..]
  error {Http401 .. Http408}:
    resp("End")

@ArikRahman
Copy link

The Nim in Action book goes very in depth with Jester, where you can create an entire Twitter clone from scratch with Jester by putting into practice what you read from the book. It may be a good starting place.

Regardless, documentation embedded into the Github would massively improve this repository, I agree with that sentiment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants