/explore

Click through on any links that interest you or select the planets on the right to continue exploring the Outer Web.
You are here

dusted.codes
| | xnacly.me

Guide about working with JSON in go with HTTP server example
2.0 parsecs

Travel
| |
| | jbrandhorst.com

Putting it all together As we touched upon earlier, we generate a package from the generated JS (meta, right?), which can be served from the server. We'll create a new file, main.go, in which we can spin up a server, serve the frontend and the gRPC backend. Much of the logic in this file is inspired by the excellent blog post put together by Brandon Philips over at CoreOS. We're using his elegant solution to serve both the HTTP API and the gRPC API on the same port.
2.3 parsecs

Travel
| |
| | www.integralist.co.uk

Introduction Four ways to skin a cat How does the adapter work? Why is this interesting? Summary/Breakdown Introduction Here is some code that demonstrates the typical 'hello world' for a Go based web server: package main import ( "fmt" "net/http" ) func handler(w http.ResponseWriter, r *http.Request) { fmt.Fprintf(w, "Hello %s", r.URL.Path[1:]) } func main() { http.HandleFunc("/World", handler) http.ListenAndServe(":8080", nil) } Note: http://localhost:8080/World will return Hello World For most people,...
1.9 parsecs

Travel
| |
| | www.alexedwards.net


12.6 parsecs

Travel
|