3 ms·
I'm using DO to hack together some web pages to help me verify data for my mobile app. I'm thinking about building out the pages. However, at the moment I'm u
by melling 12y ago
I'm using DO to hack together some web pages to help me verify data for my mobile app. I'm thinking about building out the pages. However, at the moment I'm using a simple shell script to start.
#!/bin/sh
export PORT=8080
go run go/spanishdb.go go/Html.go
Any good blogs on using Go in a production ready server? Should I run behind Apache?
- hedgehog 12y agoYour best bet is probably to put it behind nginx and use something like supervisord to launch the server itself and restart it if it panics (supervisor will also handle log rotation etc).
- MoOmer 12y agoHere here for supervisord watching Go behind nginx. I have this set up in production; even using the nginx tcpproxy plugin to reverse proxy some RPC servers.
- voidlogic 12y agoIf you want to run Go directly you can use setcap to run it on port 80, without having to run it as root. http://stackoverflow.com/questions/14537045/how-i-should-run-my-golang-process-in-background/14573592#14573592 http://stackoverflow.com/questions/14537045/how-i-should-run...
- NateDad 12y agoFYI, you don't need to run go behind anything, the http server can handle thousands of requests per second. Of course you can if you want.