Templated paths with the same hierarchy but different templated names MUST NOT exist as they are identical.
Onyx::SQL got a sweet new 0.7.2 release as well.
Onyx::HTTP is patched too.
I'm looking forward for the next Onyx release (0.4.0), which would include new API, testing helpers and new EDA version support
Yes, that docs section is still TODO.
Onyx::HTTP.listen method has a block to yield (https://github.com/onyxframework/onyx/blob/master/src/onyx/http.cr#L69). You have access to
handlers within the block:
Onyx::HTTP.listen do pp handlers end
Handlers is an array, you can modify it as you want, adding or removing custom handlers if needed.
When I try to do this:
spawn do Onyx::HTTP.listen do handlers.push(HTTP::StaticFileHandler.new("./public",false,false)) end end
..the StaticFileHandler makes every page show up as text.
Looks like this:
[some style stuff, etc.] <body> <div class="code">404</div> <h1 class="status-message">Not Found</h1> <div class="request-id">Request ID: a53ba92e-3a81-4abf-8252-fb228f560f5e</div> </body> </html> Not Found
(only works in release mode, segfaults in non-release mode)
What can I do so the StaticFileHandler doesn't append that "Not Found" ?
in lib/onyx-http/src/onyx-http/middleware/renderer/rest_error.html.ecr:4: undefined constant ::HTTP::Status
shards installfor now.
time_format.crrepository and creating new https://github.com/vladfaust/time-span-humanize. If you encounter any errors regarding to shards from now, you should delete
shard.lockand also clean