Skip to content

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

Closed
randomairborne wants to merge 1 commit into
hyperium:masterfrom
randomairborne:master
Closed

docs(examples): add an example of handler based routing#3821
randomairborne wants to merge 1 commit into
hyperium:masterfrom
randomairborne:master

Conversation

@randomairborne

Copy link
Copy Markdown

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.

Adds an example showing more complex routing functionality than that in web_api.
Builds off web_api with a more complex, reusable router framework.
@randomairborne

Copy link
Copy Markdown
Author

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

@dswij

dswij commented Jan 4, 2025

Copy link
Copy Markdown
Member

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.

@seanmonstar

Copy link
Copy Markdown
Member

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!

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

Successfully merging this pull request may close these issues.

3 participants