Vue.js and Go example project
github.com
github.com
PS. VueJS + GO great stack :)
If someone is interested to compare, I recently wrote a sample React app with a similar server stack: Go/Gin plus gorm (and SQLite, but easy to change): https://github.com/wallix/notes
Edit: I never tried Vue, but what are the advantages over React? Performance is supposedly similar, cf. https://medium.com/@ajmeyghani/javascript-frameworks-perform...
Personally I find Vue simpler. The conceptual model is simple, and the "syntax" is intuitive and easy to remember. Vue Router and the Vuex state management library are developed together the main Vue library, and as a consequence they feel part of a cohesive whole. In the end for me using Vue is a more pleasant experience (but I'm not a frontend developer, and obviously YMMV).
I was hoping to find a way for heroku to detect the subproject in the client directory, build it and deploy it as part of the heroku push. I've tried numerous approaches, and all failed for one reason or another. Did you experience the same? Does anyone else have suggestions as to how to make something like that work?
as that is pretty much my day job, i'll chime in with my 2 cents.
building on the deploying server is, of course, an option. It should however be avoided, as you can never be 100% certain that everything is exactly as the code you originally tested against.
that is why software repositories exists... and why github created a releases api [0]. and there are readily available scripts to use this as well [1] (i'm not affiliated in any way, just found that from a quick google). but you'll probably find something for your build tool of choice as well. that is often more stable
but to answer your initial question: yes, that should be possible as well. if everything else fails, you're always able to replace the normal binary start with a shell script which does everything you want and finally start the server process. That is admittedly a hack and another solution is probably preferable, but it's a fallback that always works.
[0] https://developer.github.com/v3/repos/releases/ [1] https://gist.github.com/stefanbuck/ce788fee19ab6eb0b4447a85f...
* database migrations - Does it make sense to have a library take care of this for me? Is there a battle tested library?
* orm? does it really affect performance that much? is there a favorite?
Similarly for performance you need to assess the needs of your application, prototype, and benchmark to identify bottlenecks. Most people I see asking for performance tips never actually complete enough of the project to experience the performance implications they are so worried about.
To summarize Go has never failed me in a web-oriented project (usually in the context of a REST API). Don't get me wrong, it has plenty of warts. Often you'll feel like you are writing lots of boiler plate. You won't get the advantages (and disadvantages) of "move fast and break things" ecosystems like Node or Rails. I've never regretted choosing Go.
PS: its a more advanced topic but code generation + Golang is transcendant if you find yourself writing lots of boilerplate. Huge boost to productivity when applied correctly.
Was looking at this: https://github.com/golang-migrate/migrate
Thinking Vue for front end also. Very timely main post because have been wondering best way to lay structure on the project. Simple is good and sure don't mind getting away from big framework bureaucracy, but 100 files in a folder can't be the way to go.
Suggestion to the developer: Remove the "Calculate" buttons and update mean(), std() and cdf() after clicking "Generate". Repeatedly clicking Statistic's "Calculate" and getting different results (without updating the random numbers) is slightly confusing.
The main thing with vue is getting project structure right, try grouping per pages and you will be fine!
You obviously have the router for the front-end, but with Echo, how would one add authentication support, or should I just look at a different stack such as Django or Ruby on Rails with multiple auth / ORM middleware and use Go as a back-end?
[0] https://github.com/dgrijalva/jwt-go
[1] https://hackernoon.com/simple-http-middleware-with-go-79a4ad...
Notes which I mentioned in another comment uses JWT https://github.com/wallix/notes and features a minimal auth/login API and client. Just a bit of warning: Passwords are not securely stored (in cleartext) on purpose, since the goal is to then use our (open source) SDK to encrypt passwords and other data.
protocol docs here: https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-WEB.md...
Appears to be faster, but I guess the difference wouldn't be noticeable until you start doing some pretty heavy stuff.
Or if you don't use anything then how migrations are managed in Go?