Re:Ask HN: What GO web framework do you use?
by bgdkbtv on Thursday July 21, 2022 @08:27PM
(#32187008)
What about scheduled jobs (cron), email notifications, database etc?
[ Parent
| on HN ]
My server's binary is more than a server, it can execute one off tasks, etc. For example I can execute the server binary with special arguments, ex "server --task admin-reports" in a cron job.
For the database I use Postgresql with the standard library's database/sql package (using lib/pq as the driver).
For scheduled emails and tasks, I store them in Postgres and I have a task that is run through my server binary every few hours (ex: "server --task scheduled-tasks").