> I'm not looking for an service/socket example, 

if the service part is in reference to the repo I posted, where I said 
service, you can just assume I said an http endpoint you can visit with 
your browser, and it will return a status code, like

curl -v  https://mrwilson.one/status
*   Trying 45.55.162.45...
* Connected to mrwilson.one (45.55.162.45) port 443 (#0)
* found 148 certificates in /etc/ssl/certs/ca-certificates.crt
* found 592 certificates in /etc/ssl/certs
* ALPN, offering http/1.1
* SSL connection using TLS1.2 / ECDHE_RSA_AES_128_GCM_SHA256
*      server certificate verification OK
*      server certificate status verification SKIPPED
*      common name: mrwilson.one (matched)
*      server certificate expiration date OK
*      server certificate activation date OK
*      certificate public key: RSA
*      certificate version: #3
*      subject: CN=mrwilson.one
*      start date: Fri, 19 Oct 2018 18:15:16 GMT
*      expire date: Thu, 17 Jan 2019 18:15:16 GMT
*      issuer: C=US,O=Let's Encrypt,CN=Let's Encrypt Authority X3
*      compression: NULL
* ALPN, server accepted to use http/1.1
> GET /status HTTP/1.1
> Host: mrwilson.one
> User-Agent: curl/7.47.0
> Accept: */*
> 
< HTTP/1.1 200 OK
< Date: Fri, 23 Nov 2018 20:00:33 GMT
< Content-Length: 0
< 
* Connection #0 to host mrwilson.one left intact

that endpoint returns no html just because I don't need it, but the status 
200 is there to tell me the app is running


a go deamon is just a go binary, nothing special

systemd works fine with any go binary that serves http









On Friday, November 23, 2018 at 2:18:28 PM UTC-5, Tong Sun wrote:
>
> [resending, sorry sam]
>
> On Fri, Nov 23, 2018 at 10:50 AM Sam Whited wrote:
>
>> On Thu, Nov 22, 2018, at 21:14, Tong Sun wrote:
>> > and it needs to be working under systemd. 
>> > …
>> > 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
>> >
>>
>> I'm not really sure what you're asking, Go binaries aren't doing anything 
>> special and systemd can start them just like any other program. Are you 
>> looking for an example service/socket file that lets you bind to port 443, 
>> or wondering what type of service to use? Or are you getting some other 
>> kind of error?
>>
>
> Both Go http daemon and systemd, and new to me, and I was looking for an 
> example that they work well together, and I found above. 
>
> No, I'm not looking for an service/socket example, just normal Go http 
> server started from systemd, and the only thing I found them both mentioned 
> is in above stackoverflow question 
> <https://stackoverflow.com/questions/37297714/why-systemd-cannot-start-golang-web-app>
> . 
>
> Hence I'm asking for a simplest Go http daemon that works under systemd.
>
>  
>

-- 
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