4 ms·
Storage: Postgresql Backend: Go (no framework, just the standard library) Frontend: Vue Working great so far. A little longer to get things up than using Rai
by marcus_holmes 8y ago
Storage: Postgresql
Backend: Go (no framework, just the standard library)
Frontend: Vue
Working great so far. A little longer to get things up than using Rails/Django, but the extra speed and control is really nice.
Using Go's templating engine to assemble Vue components into HTML <script> tags works well.
- no1youknowz 8y agoWhat are you using for SSR? I haven't yet seen any concrete tutorials for getting this up and running with Vue and Go. All I've been able to google is augustoroman/V8 and dop251/jago and other derivatives.
- sudhirj 8y agoIf you’re using a service like Netlify to host your front end code, you can use their predenderer (if you’re okay with 24H TTL) or run your own prerendering engine with Google’s Rendertron (Headless Chrome packaged as a renderer)
- siquick 8y agoNuxt (a framework for Vue) can take care of the minefield that is SSR
- marcus_holmes 8y agoto be honest, at this point I don't bother. My only dependency is Vue (and vuex), and I only send the components that the current page needs (packed into a single <script> by the template engine). I also send the initial data inlined in that script as js objects. So there's 1 fetch to get the the HTML (usually around 200-300Kb), then 4 fetches (vuejs, vuex, css, logo file) totalling around 500Kb (and all cached, so that only happens on the first load). So far, no speed problem and no rendering lag worth worrying about. If that changes I'll look at methods of fixing it, but I'm learning to not solve problems that I don't have yet.
- iambvk 8y agoSounds interesting cause I like to use Go everywhere. Do you have any example we could look at? Thanks.
- marcus_holmes 8y agoNothing I could post here. I'll look at knocking together a blog post about it