Update readme example

pull/192/head
Fenny 2020-02-27 05:37:48 -05:00
parent df65a5785b
commit 9e2f3d4a07
2 changed files with 12 additions and 12 deletions

12
.github/README.md vendored
View File

@ -218,15 +218,15 @@ Already supports:
func main() {
// You can setup template engine before initiation app:
app := fiber.New(&fiber.Settings{
ViewEngine: "mustache",
ViewFolder: "./views",
ViewExtension: ".tmpl",
TemplateEngine: "mustache",
TemplateFolder: "./views",
TemplateExtension: ".tmpl",
})
// OR after initiation app at any convenient location:
app.Settings.ViewEngine = "mustache"
app.Settings.ViewFolder = "./views"
app.Settings.ViewExtension = ".tmpl"
app.Settings.TemplateEngine = "mustache"
app.Settings.TemplateFolder = "./views"
app.Settings.TemplateExtension = ".tmpl"
// And now, you can call template `./views/home.tmpl` like this:
app.Get("/", func(c *fiber.Ctx) {

View File

@ -212,15 +212,15 @@ func main() {
func main() {
// You can setup template engine before initiation app:
app := fiber.New(&fiber.Settings{
ViewEngine: "mustache",
ViewFolder: "./views",
ViewExtension: ".tmpl",
TemplateEngine: "mustache",
TemplateFolder: "./views",
TemplateExtension: ".tmpl",
})
// OR after initiation app at any convenient location:
app.Settings.ViewEngine = "mustache"
app.Settings.ViewFolder = "./views"
app.Settings.ViewExtension = ".tmpl"
app.Settings.TemplateEngine = "mustache"
app.Settings.TemplateFolder = "./views"
app.Settings.TemplateExtension = ".tmpl"
// And now, you can call template `./views/home.tmpl` like this:
app.Get("/", func(c *fiber.Ctx) {