1
0
mirror of https://github.com/alice-lg/alice-lg.git synced 2024-05-11 05:55:03 +00:00

33 lines
494 B
Go
Raw Normal View History

2017-05-16 13:39:59 +02:00
package main
2017-05-16 15:22:40 +02:00
import (
"github.com/GeertJohan/go.rice"
"log"
"net/http"
)
2017-05-16 13:39:59 +02:00
func main() {
printBanner()
2017-05-16 15:22:40 +02:00
// Load configuration
// Serve static assets
assets := rice.MustFindBox("../client/build")
assetsHandler := http.StripPrefix(
"/static/",
http.FileServer(assets.HTTPBox()))
index, err := assets.String("index.html")
if err != nil {
log.Fatal(err)
}
log.Println(index)
http.Handle("/static/", assetsHandler)
// Start http server
http.ListenAndServe(":7340", nil)
2017-05-16 13:39:59 +02:00
}