net.Listener
or even http.Server
instance. The method for initialization of the server should be passed at the end, via Run
function.iris.Addr
which is an iris.Runner
typehttp.Server
instance.net.Listener
and pass that to app.Run
.iris.TLS
to serve https://
.iris.AutoTLS
which starts a secure server with certifications provided by https://letsencrypt.org for free.iris.Runner
net.Listener
. You are able to do that by iris.Raw
, but you're responsible of that methodfunc(*iris.Supervisor)
. This is used to add configurators for that specific host you passed via those functions.app.Run
method, but the difference is that these host configurators will be executed to all hosts that you may use to serve your web app (via app.NewHost
we'll see that in a minute)Application#Hosts
field, after the Run
method.app.Run
method, there are two ways of gain access to the host supervisor, read below.app.Run
or app.ConfigureHost
. There is one more way which suits better for simple scenarios and that is to use the app.NewHost
to create a new host and use one of its Serve
or Listen
functions to start the application via the iris#Raw
Runner.net/http
package.iris.Router
is compatible with the net/http/Handler
function therefore, as you can understand, it can be used to be adapted at any net/http
server, however there is an easier way, by using the app.NewHost
which is also copying all the host configurators and it closes all the hosts attached to the particular web app on app.Shutdown
.Gracefully Shutdown on CONTROL+C/COMMAND+C or when kill command sent is ENABLED BY-DEFAULT.
WithoutInterruptHandler
and register a new interrupt handler (globally, across all possible hosts).