Skip to content
This repository was archived by the owner on Aug 28, 2022. It is now read-only.
This repository was archived by the owner on Aug 28, 2022. It is now read-only.

How to use with a template engine #38

@kellabyte

Description

@kellabyte

Thanks so much for this project! I'm finding it really fun to work with.

I'm new to gofiber and I was wondering how would I use golive with gofiber and a template engine instead of returning static HTML like in your examples in the TemplateHandler function. I tried using a template engine but it looks like none of the data or interaction is correctly working in an interactive way.

Something like

	app.Get("/", func(c *fiber.Ctx) error {
		// Render index template
		return c.Render("view", fiber.Map{
			"Title": "Hello, World!",
		})
	})

I do see one mistake I have here which is there's no creation of the model object, but I'm not really sure how this flows with golive so I'm a little confused. I would really appreciate the help! Thanks so much for putting your time into this project I tried a bunch of similar ones and this one has been by far the funnest one to work with.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions