iris/_examples/file-server/single-page-application/basic/main.go
Gerasimos (Makis) Maropoulos 7b6a8f1e26
simplify some examples
2020-11-07 12:49:14 +02:00

24 lines
381 B
Go

package main
import "github.com/kataras/iris/v12"
func newApp() *iris.Application {
app := iris.New()
app.HandleDir("/", iris.Dir("./public"), iris.DirOptions{
IndexName: "index.html",
SPA: true,
})
return app
}
func main() {
app := newApp()
// http://localhost:8080
// http://localhost:8080/about
// http://localhost:8080/a_notfound
app.Listen(":8080")
}