3 ms·
If your web app is not too complex. I really like to build self contained binary in Go. All the code compile to a single binary file without any external depe
by alain_gilbert 8y ago
If your web app is not too complex.
I really like to build self contained binary in Go.
All the code compile to a single binary file without any external dependencies. I put all my static files (html, css, js, imgs) inside this binary file using "bindata". If I really need a database, I'll use sqlite as a default (this could be configured to something else).
For updates, if you do not compress the binary file (upx), you can make a binary patch with "bsdiff"/"bspatch" (http://www.daemonology.net/bsdiff/ http://www.daemonology.net/bsdiff/).
There is a Go library to do it dynamically https://github.com/kr/binarydist https://github.com/kr/binarydist. So your app could be 50Mb, but updating it would be as simple as downloading a 400Kb patch and applying it (software can do it).
For schema migration, I like https://github.com/rubenv/sql-migrate https://github.com/rubenv/sql-migrate which can be used as a library.
Therefore, the migration can be part of the binary patch in an update.
So in the end, you only distribute a native executable file for whatever platform your customer is using.