Great article! As the author of itty-router, I’d like to mention it pairs best with some of the utility functions from itty-router-extras (I always use them together) to further shorten your code (errors, status codes, and responses). That said, it never hurts to show building Responses manually like you’ve done :)
Great article! As the author of itty-router, I’d like to mention it pairs best with some of the utility functions from itty-router-extras (I always use them together) to further shorten your code (errors, status codes, and responses). That said, it never hurts to show building Responses manually like you’ve done :)
npmjs.com/package/itty-router-extras
Thanks so much, glad you liked it! itty-router is an awesome package and I can't wait to try out itty-router-extras with it in my next project :)