Closed andrewarrow closed 2 years ago
i ended up adding:
mux.Exact("/assets/b3.png", devutil.StaticFilePath("assets/b3.png"))
but there must be a better way than having to do this Exact
match for each image...
See https://github.com/vugu-examples/simple/blob/master/devserver.go#L23
Adding that line will expose the whole directory. Try e.g. http://localhost:8844/devserver.go and you'll see.
ah thank u!
is there a standard directory like
assets
or something where I can place an image I want my devserver to serve with a path like http://localhost:8844/assets/my-image.png ?