• [^] # Re: Cutelyst

    Posté par (site web personnel) . En réponse au journal Des nouvelles d'Ulfius, framework web en C. Évalué à 8. Dernière modification le 10 octobre 2018 à 11:16.

    En Go, le hello world http c'est :

     package main
     import (
     "io"
     "log"
     "net/http"
     )
     func main() {
     // Hello world, the web server
     helloHandler := func(w http.ResponseWriter, req *http.Request) {
     io.WriteString(w, "Hello, world!\n")
     }
     http.HandleFunc("/hello", helloHandler)
     log.Fatal(http.ListenAndServe(":8080", nil))
     }

    "La première sécurité est la liberté"