Cleanup
This commit is contained in:
19
main.go
19
main.go
@ -1,7 +1,6 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
|
||||
"github.com/aerogo/aero"
|
||||
@ -52,10 +51,15 @@ func main() {
|
||||
return ctx.JSON(app.Config.Manifest)
|
||||
})
|
||||
|
||||
app.Get("/ip", func(ctx *aero.Context) string {
|
||||
ip := ctx.RealIP()
|
||||
fmt.Println(ip)
|
||||
return ctx.Text(ip)
|
||||
app.Get("/favicon.ico", func(ctx *aero.Context) string {
|
||||
ctx.SetHeader("Content-Type", "image/x-icon")
|
||||
data, _ := ioutil.ReadFile("images/icons/favicon.ico")
|
||||
return string(data)
|
||||
})
|
||||
|
||||
// For benchmarks
|
||||
app.Get("/hello", func(ctx *aero.Context) string {
|
||||
return ctx.Text("Hello World")
|
||||
})
|
||||
|
||||
// Scripts
|
||||
@ -67,11 +71,6 @@ func main() {
|
||||
return js
|
||||
})
|
||||
|
||||
// For testing
|
||||
app.Get("/hello", func(ctx *aero.Context) string {
|
||||
return ctx.Text("Hello World")
|
||||
})
|
||||
|
||||
// Let's go
|
||||
app.Run()
|
||||
}
|
||||
|
Reference in New Issue
Block a user