A web framework based on the Gofiber framework, follows the MVC architecture (Model, View & Controller).
Refiber comes with Inertia.js built-in. Inertia.js is a powerful tool for creating Single Page Applications (SPA) without needing a separate API.
// in your Controller
func (web *webController) Index(s support.Refiber, c *fiber.Ctx) error {
return web.inertia.Render(c).Page("Home", &fiber.Map{
"hello": "World",
})
}// in your React App
export default function HomePage({ hello }) {
return <h1>Hello {hello}</h1>;
}Online documentation https://refiber.bykevin.work
To install Refiber, you first need to install the CLI. Use the following command:
go install github.com/refiber/refiber-cli@latest
Now you can just run this command bellow to create a new Refiber project
refiber-cli new my-app