GO Simple HTTP Server demo

 GO Simple HTTP Server demo

package main

import (
    "fmt"
    "net/http"
)

func PathHandler(w http.ResponseWriter, r *http.Request) {
    fmt.Fprintln(w, "hello, wellcome to go http world")
}

func main() {
    http.HandleFunc("/", PathHandler)
    http.ListenAndServe("127.0.0.0:8080", nil)
}

Comments

Popular posts from this blog

Python Receiving and parse JSON Data via UDP protocol

ubus lua client method and event registration code demo/example