mirror of
https://github.com/kataras/iris.git
synced 2025-01-23 10:41:03 +01:00
24 lines
381 B
Go
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")
|
|
}
|