go-aah / aah

A secure, flexible, rapid Go web framework
https://aahframework.org
MIT License
690 stars 33 forks source link

Console commands #198

Closed radutopala closed 5 years ago

radutopala commented 6 years ago

We should be able to run commands directly from the main binary if in prod env or through aah binary when in dev mode.

Please see Buffalo grifts at https://github.com/markbates/grift, https://github.com/gobuffalo/buffalo/tree/master/grifts.


jeevatkm commented 6 years ago

@radutopala I like the idea. Could you provide further details on commands that would be a candidate to be run from app/main binary?

I could think of one action is database migrate from app library.

radutopala commented 6 years ago

@jeevatkm I'd see this as a generic gate for any kind of commands that a developer needs to create in his app, similar to what Symfony has done with the Console component Or Buffalo with Grifts.

So, basically, we should be allowed:

Examples can be numerous: db migration command, one-off commands, import commands, app specific setup commands etc

jeevatkm commented 6 years ago

@radutopala Now I fully understood. Thanks. So console module it is 😄

radutopala commented 6 years ago

@jeevatkm I've renamed the issue to be in line with the spec 😄

vzool commented 5 years ago

This even could behave like a background Tasks/Jobs run by cron :heart_eyes:

jeevatkm commented 5 years ago

@radutopala Here is the upcoming console commands documentation https://github.com/go-aah/docs/blob/v0.12-edge/console-commands.md

Could you have a look and let me know if you have questions?

jeevatkm commented 5 years ago

Done 😄

radutopala commented 5 years ago

@jeevatkm top notch, thx