Check this repository

https://github.com/fmpwizard/mrwilson

* It runs a very simple https service
* Gets certificates using Let's Encrypt
* Has ansible playbook to run the app under systemd

feel free to ask any questions.

Diego




On Thursday, November 22, 2018 at 10:14:52 PM UTC-5, Tong Sun wrote:
>
> Hi, 
>
> I want to write a simple Go http daemon that return a static string 
> regardless what the request is, 
> like this one: 
> https://github.com/suntong/dbab/blob/master/src/bin/dbab-svr#L20
>
> and it needs to be working under systemd. 
>
> *What is the best example that I can start with?* (They both, Go http 
> daemon and systemd, and new to me)
>
> I found 
>
> enricofoltran <https://gist.github.com/enricofoltran>/main.go 
> <https://gist.github.com/enricofoltran/10b4a980cd07cb02836f70a4ab3e72d7>
>
> A simple golang web server with basic logging, tracing, health check, 
> graceful shutdown and zero dependencies
>
>
> but it seems not supporting https requests,
>
> I also found 
>
> tabalt <https://github.com/tabalt>/gracehttp 
> <https://github.com/tabalt/gracehttp>
>
> a simple and graceful HTTP server for Golang
>
>
> which seems quite complete, it has nice single-handling and https support. 
> but there is no mentioning of how it can work under systemd, which could 
> be troublesome, 
> like the question I found at why systemd cannot start golang web app 
> <https://stackoverflow.com/questions/37297714/why-systemd-cannot-start-golang-web-app>
>
> Any help appreciated. Thx. 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to