tiny-url-ex/main.go

25 lines
310 B
Go
Raw Normal View History

package main
import (
2018-07-05 17:18:25 +00:00
"git.xdrm.io/go/aicra"
"log"
"net/http"
)
func main() {
2018-10-01 17:28:54 +00:00
listenTo := "127.0.0.1:4242"
2018-10-01 17:28:54 +00:00
server, err := aicra.New("api.json")
if err != nil {
panic(err)
}
2018-10-01 17:28:54 +00:00
log.Printf("[Server up] %s\n", listenTo)
err = http.ListenAndServe(listenTo, server)
if err != nil {
panic(err)
}
}