Re:Don't build a general-purpose API to power your own front...
by tdeck on Tuesday September 14, 2021 @12:53AM
(#28520374)
Also, consider using Rails and Turbolinks if you're familiar with them. You can get pretty far with turbolinks and the responsiveness is similar to a single page app.
[ Parent
| on HN ]
Re:Don't build a general-purpose API to power your own front...
by andreygrehov on Tuesday September 14, 2021 @12:58AM
(#28520402)
Thanks for the advice. I use Go on the backend, but couldn't resist some "fanciness". I embed all the html/css/js/images files into a binary and serve everything from memory. Zero disc reads. It's blazing fast. Also, deploying the entire website becomes painless – scp the binary and restart the process.
Re:Don't build a general-purpose API to power your own front...
by selcuka on Tuesday September 14, 2021 @01:43AM
(#28520682)
You can still benefit from something like https://github.com/instantpage/instant.page as a poor man's replacement of Turbo(links).
Re:Don't build a general-purpose API to power your own front...
by zeepzeep on Tuesday September 14, 2021 @03:11AM
(#28521327)
> I embed all the html/css/js/images files into a binary and serve everything from memory. Zero disc reads. It's blazing fast.
I do that too. A friend "stole" that idea from the tour of go, I really like it. Just go generate before building to make add static files, go build, done. 1 binary, it just works.