hyper icon indicating copy to clipboard operation
hyper copied to clipboard

docs(examples): add an example of handler based routing

Open randomairborne opened this issue 1 year ago • 2 comments

Adds an example showing more complex routing functionality than that in web_api. Builds off web_api with a more complex, reusable router framework. This is a pretty complex example, it has more lines of code than any other example except single_thread. It may need to be pared down- do not hesitate to let me know if there's anything that's overcomplicated or needs to be changed.

randomairborne avatar Jan 03 '25 22:01 randomairborne

I am curious- I noticed that the other examples tend to contain fairly few comments. Is this intentional?

randomairborne avatar Jan 03 '25 22:01 randomairborne

I am curious- I noticed that the other examples tend to contain fairly few comments. Is this intentional?

I won't say it's intentional. More likely, the author thought the parts are easy to understand so a comment is unnecessary.

If the comment can explain what's happening, it's good to have. But if it's more of a guide, then we can put it in the website instead.

dswij avatar Jan 04 '25 10:01 dswij

I appreciate the interesting example! However, I'm trying to now limit how many examples are in the repository, since they increase compile/test time and maintenance. It would certainly be an interesting blog post, though!

seanmonstar avatar Nov 10 '25 16:11 seanmonstar