http.Serverinstance. The method for initialization of the server should be passed at the end, via
iris.Addrwhich is an
net.Listenerand pass that to
iris.AutoTLSwhich starts a secure server with certifications provided by https://letsencrypt.org for free.
net.Listener. You are able to do that by
iris.Raw, but you're responsible of that method
func(*iris.Supervisor). This is used to add configurators for that specific host you passed via those functions.
app.Runmethod, 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.NewHostwe'll see that in a minute)
Application#Hostsfield, after the
app.Runmethod, there are two ways of gain access to the host supervisor, read below.
app.ConfigureHost. There is one more way which suits better for simple scenarios and that is to use the
app.NewHostto create a new host and use one of its
Listenfunctions to start the application via the
iris.Routeris compatible with the
net/http/Handlerfunction therefore, as you can understand, it can be used to be adapted at any
net/httpserver, however there is an easier way, by using the
app.NewHostwhich is also copying all the host configurators and it closes all the hosts attached to the particular web app on
WithoutInterruptHandlerand register a new interrupt handler (globally, across all possible hosts).