Enabling static files
This commit is contained in:
parent
c15e4da93c
commit
6e6b003e05
@ -20,5 +20,8 @@ func routes(app *config.AppConfig) http.Handler {
|
||||
mux.Get("/", handlers.Repo.Home)
|
||||
mux.Get("/about", handlers.Repo.About)
|
||||
|
||||
fileServer := http.FileServer(http.Dir("./static/"))
|
||||
mux.Handle("/static/*", http.StripPrefix("/static", fileServer))
|
||||
|
||||
return mux
|
||||
}
|
||||
|
BIN
static/images/outside.png
Normal file
BIN
static/images/outside.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.8 MiB |
BIN
static/images/tray.png
Normal file
BIN
static/images/tray.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.8 MiB |
BIN
static/images/woman-laptop.png
Normal file
BIN
static/images/woman-laptop.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 MiB |
@ -5,6 +5,7 @@
|
||||
<div class="col">
|
||||
<h1>This is the home page</h1>
|
||||
<p>This is the content</p>
|
||||
<img src="/static/images/outside.png" alt="outside image" height="1330" width="2364">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user