This project is under development
go get github.com/hasangenc0/microfrontends
Look at the examples folder
cd examples
sh run.sh
gateways := []microfrontends.Gateway{
{
Name: "header",
Host: "http://localhost",
Port: "4462",
Method: "GET",
},
{
Name: "footer",
Host: "http://localhost",
Port: "4463",
Method: "GET",
},
{
Name: "content",
Host: "http://localhost",
Port: "4461",
Method: "POST",
},
}
page := microfrontends.Page{
Name: "App",
Content: `
<html>
<body>
<chunk name="header"></chunk>
<chunk name="content"></chunk>
<chunk name="footer"></chunk>
</body>
</html>
`,
}
app := microfrontends.App{
gateways,
page,
w,
}
app.Init()