2018-07-08 13:29:25 +00:00
|
|
|
package main
|
2018-06-10 20:49:32 +00:00
|
|
|
|
|
|
|
import (
|
2018-07-05 17:18:25 +00:00
|
|
|
"git.xdrm.io/go/aicra"
|
2018-06-10 20:49:32 +00:00
|
|
|
"log"
|
2018-07-11 17:08:09 +00:00
|
|
|
"net/http"
|
2018-06-10 20:49:32 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
|
2018-07-11 17:08:09 +00:00
|
|
|
listen_addr := "127.0.0.1:4242"
|
|
|
|
|
2018-07-07 21:09:19 +00:00
|
|
|
server, err := aicra.New("manifest.json")
|
2018-06-10 20:49:32 +00:00
|
|
|
if err != nil {
|
2018-07-11 17:08:09 +00:00
|
|
|
panic("cannot load config")
|
2018-06-10 20:49:32 +00:00
|
|
|
}
|
|
|
|
|
2018-07-11 17:08:09 +00:00
|
|
|
log.Printf("[Server up] %s\n", listen_addr)
|
|
|
|
err = http.ListenAndServe(listen_addr, server)
|
2018-06-10 20:49:32 +00:00
|
|
|
if err != nil {
|
2018-07-11 17:08:09 +00:00
|
|
|
panic(err)
|
2018-06-10 20:49:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|