GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — AppManager/main.go at master · i24fff/AppManager Expand file tree/ Copy pathmain.goMore file actions 53 lines (41 loc) · 1.08 KB / Copy pathmain.goFile metadata and controls53 lines (41 loc) · 1.08 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 package main import ( "./appmanager" "./mongodb" "./route" "net/http" // "encoding/base64" "fmt" "github.com/go-martini/martini" "github.com/martini-contrib/auth" "github.com/martini-contrib/render" // "time" ) func main() { fmt.Println("Hello, let's go!") // aaa := base64.StdEncoding.EncodeToString([]byte("admin:guessme")) // fmt.Println(aaa) mongodb.Init() m := martini.Classic() m.Use(auth.BasicFunc(func(username, password string) bool { fmt.Println("username = " + username) fmt.Println("password = " + password) return auth.SecureCompare(username, "admin") && auth.SecureCompare(password, "guessme") })) m.Use(martini.Static("client")) m.Use(martini.Static("static")) fileServer := http.FileServer(http.Dir("./static")) m.Any("/apk/**", func(res http.ResponseWriter, req *http.Request) { fmt.Println("/apk/") fileServer.ServeHTTP(res, req) }) m.Use(render.Renderer(render.Options{ Directory: "templates", Layout: "layout", Extensions: []string{".tmpl", ".html"}, })) route.Route(m) appmanager.Init() appmanager.RouteApi(m) m.Run() } |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |