My question is about web servers and libraries focused on the HTTP protocol.
In PHP you can use "apache" as a web server, but in other languages is the same stack used? This question came to me when I searched for languages like Go , Crystal , Hack , Ruby and Python .
I saw that they have libraries focused on the HTTP protocol, in them you create your own web server, serving itself or is a complement to apache (for example)?
Would it be how you create your own "requisitions" structure, shaping as you need them?
I've always kept this doubt, I know I'll always need a web server, but I do not know if apache or nginx will ever fit (the ones I know).
Example:
Código tirado do site: cystal-lang.org
require "http/server"
server = HTTP::Server.new(8080) do |context|
context.response.content_type = "text/plain"
context.response.print "Hello world, got #{context.request.path}!"
end
puts "Listening on http://0.0.0.0:8080"
server.listen
Thankful