johanbrandhorst / grpc-gateway-boilerplate

All the boilerplate you need to get started with writing grpc-gateway powered REST services in Go
MIT License
479 stars 83 forks source link

Listen on both https and http? #36

Closed dfang closed 2 years ago

dfang commented 2 years ago

Can i listen both on https and http?

johanbrandhorst commented 2 years ago

Yes, you can create separate http.Servers on different ports, one with TLS and one without, and then use the gateway mux with both servers. This is a more general Go question, and this isn't the right forum for this, try asking on Gophers Slack.