File: serve_appengine.go

package info (click to toggle)
golang-github-zenazn-goji 1.0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 464 kB
  • sloc: makefile: 3
file content (23 lines) | stat: -rw-r--r-- 470 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// +build appengine

package goji

import (
	"log"
	"net/http"
)

func init() {
	if fl := log.Flags(); fl&log.Ltime != 0 {
		log.SetFlags(fl | log.Lmicroseconds)
	}
}

// Serve starts Goji using reasonable defaults.
func Serve() {
	DefaultMux.Compile()
	// Install our handler at the root of the standard net/http default mux.
	// This is required for App Engine, and also allows packages like expvar
	// to continue working as expected.
	http.Handle("/", DefaultMux)
}