experiments

All kinds of coding experiments
Log | Files | Refs | Submodules

main.go (251B)


      1 package main
      2 
      3 import (
      4 	"fmt"
      5 	"net/http"
      6 	"os"
      7 )
      8 
      9 func main() {
     10 	http.HandleFunc("/", handleSite)
     11 	http.HandleFunc(getAPIHandler("/api/", apiOperations))
     12 	if err := http.ListenAndServe(":8080", nil); err != nil {
     13 		fmt.Println(err)
     14 		os.Exit(1)
     15 	}
     16 }