tiny-url-ex/main.go

26 lines
375 B
Go
Raw Normal View History

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