2016-11-14 00:34:01 +09:00

33 lines
592 B
Go

package main
import (
"io/ioutil"
"github.com/aerogo/aero"
"github.com/animenotifier/notify.moe/components"
)
var app = aero.New()
func main() {
app.SetStyle(components.BundledCSS)
scripts, _ := ioutil.ReadFile("temp/scripts.js")
js := string(scripts)
app.Get("/scripts.js", func(ctx *aero.Context) string {
ctx.SetHeader("Content-Type", "application/javascript")
return js
})
app.Get("/hello", func(ctx *aero.Context) string {
return "Hello World"
})
app.Layout = func(ctx *aero.Context, content string) string {
return components.Layout(content)
}
app.Run()
}