You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
require "onyx-http"
logger = Onyx::HTTP::Logger.new
request_id = Onyx::HTTP::RequestID.new
response_time = Onyx::HTTP::ResponseTime.new
router = Onyx::HTTP::Router.new do
get "/" do |env|
env.response << "Hello Onyx"
end
post "/echo" do |env|
env.response << env.request.body.try &.gets_to_end
end
end
server = Onyx::HTTP::Server.new(response_time, request_id, logger, router)
server.bind_tcp(5000)
server.listen
I have Error: undefined constant Onyx::HTTP::Logger and if comment this line have error in next line Error: undefined constant Onyx::HTTP::RequestID and so on
The text was updated successfully, but these errors were encountered:
Hi, Vlad! Awesome framework, but i have some issues:
crystal: 0.30.0
shards.lock
Example from here https://docs.onyxframework.org/http/advanced/custom-server.html#routing
I have
Error: undefined constant Onyx::HTTP::Logger
and if comment this line have error in next lineError: undefined constant Onyx::HTTP::RequestID
and so onThe text was updated successfully, but these errors were encountered: