Created
June 21, 2018 12:01
-
-
Save arriqaaq/b32b3cecd9060c25a5dc3fcfdc172c09 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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