mirror of
https://github.com/kataras/iris.git
synced 2025-12-17 18:07:01 +00:00
New DirOptions.Cache field for in-memory caching and pre-compression for the fastest possible static file server
Read HISTORY.md it contains a breaking change, second parameter of HandleDir should be iris.Dir(...) instead of just a string relative to: https://github.com/kataras/iris/issues/1556#issuecomment-661057446 Former-commit-id: 14b48a06fb3b99287dff543932be2937a64233b9
This commit is contained in:
@@ -101,7 +101,7 @@ func main() {
|
||||
app.RegisterView(iris.HTML("./views", ".html"))
|
||||
|
||||
// Make the /public route path to statically serve the ./public/... contents
|
||||
app.HandleDir("/public", "./public")
|
||||
app.HandleDir("/public", iris.Dir("./public"))
|
||||
|
||||
// Render the actual form
|
||||
// GET: http://localhost:8080
|
||||
|
||||
@@ -168,7 +168,7 @@ func main() {
|
||||
app := iris.New()
|
||||
app.RegisterView(iris.HTML("./views", ".html"))
|
||||
|
||||
app.HandleDir("/public", "./public")
|
||||
app.HandleDir("/public", iris.Dir("./public"))
|
||||
|
||||
app.Get("/", func(ctx iris.Context) {
|
||||
ctx.View("upload.html")
|
||||
|
||||
@@ -121,7 +121,7 @@ func main() {
|
||||
app := iris.New()
|
||||
app.RegisterView(iris.HTML("./views", ".html"))
|
||||
|
||||
app.HandleDir("/public", "./public")
|
||||
app.HandleDir("/public", iris.Dir("./public"))
|
||||
|
||||
app.Get("/", func(ctx iris.Context) {
|
||||
ctx.View("upload.html")
|
||||
|
||||
Reference in New Issue
Block a user