worked on handler and templates
This commit is contained in:
11
main.go
11
main.go
@@ -8,9 +8,9 @@ import (
|
||||
"github.com/dalu/wiki/wiki"
|
||||
"github.com/dalu/wiki/wiki/storage"
|
||||
"github.com/dalu/wiki/wiki/storage/mongo"
|
||||
"github.com/dalu/wiki/wiki/template"
|
||||
"gopkg.in/mgo.v2"
|
||||
"gopkg.in/mgo.v2/bson"
|
||||
"github.com/dalu/wiki/wiki/template"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@@ -33,7 +33,14 @@ func main() {
|
||||
wikiHandler := wiki.NewWikiHandler(mongostore, renderer, log)
|
||||
mux.Handle(wiki.DefaultMountPath, http.StripPrefix(wiki.DefaultMountPath, wikiHandler))
|
||||
|
||||
log.Fatal(http.ListenAndServe(":8080", mux))
|
||||
server := &http.Server{
|
||||
Handler: mux,
|
||||
Addr: ":8080",
|
||||
WriteTimeout: 15 * time.Second,
|
||||
ReadTimeout: 15 * time.Second,
|
||||
}
|
||||
|
||||
log.Fatal(server.ListenAndServe())
|
||||
}
|
||||
|
||||
func initializeWiki(s storage.Interface) error {
|
||||
|
Reference in New Issue
Block a user