luckyframework / lucky

A full-featured Crystal web framework that catches bugs for you, runs incredibly fast, and helps you write code that lasts.
https://luckyframework.org
MIT License
2.57k stars 156 forks source link

Combine server bind_tcp and listen #1622

Closed matthewmcgarvey closed 2 years ago

matthewmcgarvey commented 2 years ago

HTTP::Server#listen provides an overload that does exactly what we are doing on two lines.

https://crystal-lang.org/api/1.0.0/HTTP/Server.html#listen(host:String,port:Int32,reuse_port:Bool=false)-instance-method