Skip to content
Snippets Groups Projects
Unverified Commit 45f14a52 authored by Angelo Capossele's avatar Angelo Capossele Committed by GitHub
Browse files

Fix/upgrade packr (#291)

* :arrow_up: upgrades packr
* :recycle: go mod tidy
parent 59212ea2
No related branches found
No related tags found
No related merge requests found
......@@ -6,9 +6,7 @@ require (
github.com/dgraph-io/badger/v2 v2.0.1
github.com/dgrijalva/jwt-go v3.2.0+incompatible
github.com/dgryski/go-farm v0.0.0-20191112170834-c2139c5d712b // indirect
github.com/gobuffalo/envy v1.8.1 // indirect
github.com/gobuffalo/logger v1.0.3 // indirect
github.com/gobuffalo/packr/v2 v2.7.1
github.com/gobuffalo/packr/v2 v2.8.0
github.com/golang/protobuf v1.3.2
github.com/googollee/go-engine.io v1.4.3-0.20190924125625-798118fc0dd2
github.com/googollee/go-socket.io v1.4.3-0.20191204093753-683f8725b6d0
......@@ -27,21 +25,19 @@ require (
github.com/panjf2000/ants/v2 v2.2.2
github.com/pelletier/go-toml v1.6.0 // indirect
github.com/pkg/errors v0.9.1
github.com/rogpeppe/go-internal v1.5.2 // indirect
github.com/sergi/go-diff v1.1.0 // indirect
github.com/spf13/afero v1.2.2 // indirect
github.com/spf13/cast v1.3.1 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.6.1
github.com/stretchr/testify v1.4.0
github.com/stretchr/testify v1.5.1
github.com/valyala/fasttemplate v1.1.0 // indirect
go.uber.org/atomic v1.5.1
go.uber.org/zap v1.13.0
golang.org/x/crypto v0.0.0-20200214034016-1d94cc7ab1c6
golang.org/x/net v0.0.0-20200202094626-16171245cfb2
golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4 // indirect
golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7 // indirect
golang.org/x/crypto v0.0.0-20200311171314-f7b00557c8c4
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b
golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527 // indirect
gopkg.in/ini.v1 v1.51.1 // indirect
gopkg.in/src-d/go-git.v4 v4.13.1
gopkg.in/yaml.v2 v2.2.7 // indirect
......
This diff is collapsed.
......@@ -35,7 +35,9 @@ func Configure() {
engine.Static("/static", "./plugins/analysis/webinterface/httpserver/static")
engine.File("/", "./plugins/analysis/webinterface/httpserver/static/index.html")
} else {
engine.GET("/static/*", echo.WrapHandler(http.StripPrefix("/static", http.FileServer(assetsBox))))
for _, res := range assetsBox.List() {
engine.GET("/static/"+res, echo.WrapHandler(http.StripPrefix("/static", http.FileServer(assetsBox))))
}
engine.GET("/", index)
}
......
......@@ -10,7 +10,6 @@ import (
"github.com/iotaledger/goshimmer/packages/parameter"
"github.com/labstack/echo"
"github.com/pkg/errors"
)
var ErrInvalidParameter = errors.New("invalid parameter")
......@@ -48,8 +47,13 @@ func setupRoutes(e *echo.Echo) {
} else {
// load assets from packr: either from within the binary or actual disk
e.GET("/app/*", echo.WrapHandler(http.StripPrefix("/app", http.FileServer(appBox))))
e.GET("/assets/*", echo.WrapHandler(http.StripPrefix("/assets", http.FileServer(assetsBox))))
for _, res := range appBox.List() {
e.GET("/app/"+res, echo.WrapHandler(http.StripPrefix("/app", http.FileServer(appBox))))
}
for _, res := range assetsBox.List() {
e.GET("/assets/"+res, echo.WrapHandler(http.StripPrefix("/assets", http.FileServer(assetsBox))))
}
}
e.GET("/ws", websocketRoute)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment