Code Monkey home page Code Monkey logo

Comments (7)

Fenny avatar Fenny commented on April 30, 2024 3

We only support Go engines for now, maybe we write our own in the far future.

from fiber.

Fenny avatar Fenny commented on April 30, 2024 2

Render is available on the master branch for testing, 6 template engines are available:

The function uses the correct engine based on the file extension.

func main() {
  app := fiber.New()
  app.Get("/", func(c *fiber.Ctx) {
    data := map[string]interface{}{
      "name": "John",
      "age":  "35",
    }
    var err error
    //err = c.Render("views/test.template", data)
    //err = c.Render("views/test.ace", data)
    //err = c.Render("views/test.amber", data)
    //err = c.Render("views/test.jet", data)
    //err = c.Render("views/test.raymond", data)
    err = c.Render("views/test.mustache", data)
    if err != nil {
      fmt.Println(err)
    }
  })

  app.Listen(3000)
}

from fiber.

welcome avatar welcome commented on April 30, 2024 1

Thanks for opening your first issue here! 🎉 Be sure to follow the issue template!

from fiber.

Fenny avatar Fenny commented on April 30, 2024 1

@mauricionr, we just released v1.6.0

Template rendering now our no.1 priority 👍, I will keep this issue open until we got more updates.

from fiber.

Fenny avatar Fenny commented on April 30, 2024 1

@mauricionr, feel free to suggest go template engines ( a link would be nice 😄 )

from fiber.

mauricionr avatar mauricionr commented on April 30, 2024

json could be added as a template? like in phoenix 🙈 🤔

from fiber.

mauricionr avatar mauricionr commented on April 30, 2024

https://hexdocs.pm/phoenix/views.html#rendering-json

sorry i forgot to put the link

from fiber.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.