Documentation ¶
Overview ¶
Package server responds to incoming HTTP requests and renders the site.
There are a number of smaller servers in this package, each of which takes only the configuration necessary to serve it.
Example ¶
settings := &config.Settings{ PublicHost: "myapp.com", SecretKey: nacl.NewKey(), } s, _ := NewServer(settings) http.Handle("/", s) http.ListenAndServe(":4114", nil)
Output:
Index ¶
Examples ¶
Constants ¶
View Source
const HTML5DatetimeLocalFormat = "2006-01-02T15:04"
View Source
const Version = "1.6"
Server version, run "make release" to increase this value
Variables ¶
This section is empty.
Functions ¶
func AddAuthenticator ¶
AddAuthenticator adds the Authenticator as a HTTP middleware. If authentication is successful, we set the User in the request context and continue.
Types ¶
Click to show internal directories.
Click to hide internal directories.