25 lines
310 B
Go
25 lines
310 B
Go
package main
|
|
|
|
import (
|
|
"git.xdrm.io/go/aicra"
|
|
"log"
|
|
"net/http"
|
|
)
|
|
|
|
func main() {
|
|
|
|
listenTo := "127.0.0.1:4242"
|
|
|
|
server, err := aicra.New("api.json")
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
|
|
log.Printf("[Server up] %s\n", listenTo)
|
|
err = http.ListenAndServe(listenTo, server)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
|
|
}
|