Skip to content

Instantly share code, notes, and snippets.

@arriqaaq
Created June 21, 2018 12:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arriqaaq/b32b3cecd9060c25a5dc3fcfdc172c09 to your computer and use it in GitHub Desktop.
Save arriqaaq/b32b3cecd9060c25a5dc3fcfdc172c09 to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
lucio "github.com/arriqaaq/server"
"log"
"net/http"
"os"
)
func main() {
mux := http.NewServeMux()
mux.HandleFunc("/hello", func(w http.ResponseWriter, req *http.Request) {
fmt.Fprintf(w, "Hello from %v!\n", os.Getpid())
})
server := lucio.NewServer(mux, "0.0.0.0", 8080)
err := server.Serve()
log.Println("terminated", os.Getpid(), err)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment