tiny-url-ex/main.go

25 lines
341 B
Go

package main
import (
"git.xdrm.io/go/aicra"
"log"
"net/http"
)
func main() {
listen_addr := "127.0.0.1:4242"
server, err := aicra.New("manifest.json")
if err != nil {
panic("cannot load config")
}
log.Printf("[Server up] %s\n", listen_addr)
err = http.ListenAndServe(listen_addr, server)
if err != nil {
panic(err)
}
}