Upgraded to latest pixy version

This commit is contained in:
2016-11-13 01:40:16 +09:00
parent d6075f55b9
commit f9424a79e4
11 changed files with 14 additions and 7 deletions

33
main.go Normal file
View File

@ -0,0 +1,33 @@
package main
import (
"io/ioutil"
"github.com/aerogo/aero"
"github.com/animenotifier/notify.moe/components"
)
var app = aero.New()
func main() {
// app.SetStyle(bundledCSS)
app.SetStyle("")
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()
}