1.0.4 - Alpha Websocket Support, Partials can be anywhere
Release 1.0.4
Partial Updates Partials can now be placed anywhere in the project instead of just the partials folder. This is useful for colocating partials and pages together for a simpler setup. The partials folder is no longer necessary.
As long as your function returns *h.Partial, it will get registered as a partial and can be used, anywhere in the project.
To get these partial updates, make sure to update the htmgo cli.
Mac / Linux
GOPROXY=direct go install github.com/maddalax/htmgo/cli/htmgo@latest
Windows
set GOPROXY=direct && go install github.com/maddalax/htmgo/cli/htmgo@latest
Websocket Extension Alpha I released alpha support for a websocket extension. Sample project: https://github.com/maddalax/htmgo/tree/master/examples/ws-example. No documentation is written for it at the moment while I'm testing it out on a larger project I'm building with htmgo. Feel free to look through the ws-example project though.
The extension allows you to push elements to the page and react to events such as OnClick, using ws.OnClick. The ws extension handles all of the connection management for you, so you can focus on your core logic.
At the moment the there is no documentation for it and things may not work, so unless you are OK with diving deep into the code, I wouldn't utilize it at this moment.
Here is some load testing I did with it though, results look promising, around 50k sockets connected in a machine with 8gb RAM, sending messages every 1s.
PAAS (htmgo project)
Very very early preview, but I'm working on building a larger project with htmgo + the websocket extension. The project will be a dead simple self hosted platform as a service to deploy your apps.
This will be a great test to prove how well htmgo can work for non trivial apps, as well as will be something useful for me personally, and hopefully others.