-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Expand file tree
/
Copy pathmain.go
More file actions
27 lines (21 loc) · 552 Bytes
/
main.go
File metadata and controls
27 lines (21 loc) · 552 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package main
import (
"github.com/kataras/iris/v12"
"github.com/quic-go/quic-go/http3"
)
/*
$ go get github.com/quic-go/quic-go@master
*/
func main() {
app := iris.New()
app.Get("/", func(ctx iris.Context) {
ctx.Writef("Hello from Index")
})
// app.Configure(iris.WithOptimizations, or any other core config here)
// app.Build()
// http3.ListenAndServe(":443", "./localhost.cert", "./localhost.key", app)
// OR:
app.Run(iris.Raw(func() error {
return http3.ListenAndServe(":443", "./localhost.cert", "./localhost.key", app)
}))
}