2 ms·
>>How do you run golang as a server? Using the net/http package that comes with Go. >>Can anyone point me to a basic tutorial? To learn Go - http://tour.gola
by billwashere 14y ago
>>How do you run golang as a server?
Using the net/http package that comes with Go.
>>Can anyone point me to a basic tutorial?
To learn Go - http://tour.golang.org/ http://tour.golang.org/
To learn about http http://golang.org/doc/effective_go.html http://golang.org/doc/effective_go.html (A list of available functions are found here http://golang.org/pkg/net/http/ http://golang.org/pkg/net/http/)
Gorilla is a great web framework that builds upon the net/http package - http://gorilla-web.appspot.com/ http://gorilla-web.appspot.com/
>>Is it still running under something like Apache is golang IS the server somehow? If so Wouldn't each http request have to fire up the compiled executable?
What you are describing is CGI (http://en.wikipedia.org/wiki/Common_Gateway_Interface http://en.wikipedia.org/wiki/Common_Gateway_Interface) whilst it could be possible but don't for real severs its really old and slow.