1
0
mirror of https://github.com/gofiber/fiber.git synced 2025-02-22 06:33:09 +00:00

Merge pull request #192 from Fenny/master

Update readme example
This commit is contained in:
Fenny 2020-02-26 23:42:05 -05:00 committed by GitHub
commit 9763ccb679
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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) {