Compressing handlergit add .
continuous-integration/drone/push Build is passing Details

This commit is contained in:
DutchEllie 2022-03-24 14:31:02 +01:00
parent bb163abb0a
commit 7717210578
Signed by: DutchEllie
SSH Key Fingerprint: SHA256:dKq6ZSgN5E3Viqrw/+xAdf2VdR6hdRGNyrYqXXwfjTY
3 changed files with 15 additions and 3 deletions

10
go.mod
View File

@ -2,6 +2,12 @@ module dutchellie.nl/DutchEllie/proper-website-2
go 1.17
require github.com/maxence-charriere/go-app/v9 v9.3.3
require (
github.com/gorilla/handlers v1.5.1
github.com/maxence-charriere/go-app/v9 v9.3.3
)
require github.com/google/uuid v1.3.0 // indirect
require (
github.com/felixge/httpsnoop v1.0.1 // indirect
github.com/google/uuid v1.3.0 // indirect
)

4
go.sum
View File

@ -1,9 +1,13 @@
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/felixge/httpsnoop v1.0.1 h1:lvB5Jl89CsZtGIWuTcDM1E/vkVs49/Ml7JJe07l8SPQ=
github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
github.com/gomarkdown/markdown v0.0.0-20210408062403-ad838ccf8cdd/go.mod h1:aii0r/K0ZnHv7G0KF7xy1v0A7s2Ljrb5byB7MO5p6TU=
github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4=
github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q=
github.com/maxence-charriere/go-app/v9 v9.3.3 h1:vo+1oohWMfTQ0S3eg9JOjuFEy1n3bVNgeDi4eHNfMzA=
github.com/maxence-charriere/go-app/v9 v9.3.3/go.mod h1:zo0n1kh4OMKn7P+MrTUUi7QwUMU2HOfHsZ293TITtxI=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=

View File

@ -4,6 +4,7 @@ import (
"log"
"net/http"
"github.com/gorilla/handlers"
"github.com/maxence-charriere/go-app/v9/pkg/app"
)
@ -78,7 +79,8 @@ func main() {
}
app.GenerateStaticWebsite("./staticsite", handler)
http.Handle("/", handler)
compressed := handlers.CompressHandler(handler)
http.Handle("/", compressed)
if err := http.ListenAndServe(":8000", nil); err != nil {
log.Fatal(err)