mirror of
https://github.com/Lomanic/presence-button-web
synced 2025-12-01 17:56:29 +00:00
Inital go version
This commit is contained in:
commit
16dc72f1bf
2 changed files with 20 additions and 0 deletions
4
README.md
Normal file
4
README.md
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
Presence button
|
||||||
|
===============
|
||||||
|
|
||||||
|
See https://wiki.fuz.re/doku.php?id=projets:fuz:presence_button
|
||||||
16
main.go
Normal file
16
main.go
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"log"
|
||||||
|
"net/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
func handler(w http.ResponseWriter, r *http.Request) {
|
||||||
|
fmt.Fprintf(w, "Hi there, I love %s!", r.URL.Path[1:])
|
||||||
|
}
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
http.HandleFunc("/", handler)
|
||||||
|
log.Fatal(http.ListenAndServe(":8080", nil))
|
||||||
|
}
|
||||||
Loading…
Add table
Reference in a new issue