Skip to content

Commit

Permalink
chore: refine file server example
Browse files Browse the repository at this point in the history
  • Loading branch information
kevwan committed Jul 17, 2024
1 parent d138cb3 commit da7adc0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/faq/http/fileserver.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func main() {
server := rest.MustNewServer(rest.RestConf{
Host: "localhost",
Port: 4000,
}, rest.WithFileServer("/static", "html"))
}, rest.WithFileServer("/static", http.Dir("html")))
defer server.Stop()

server.AddRoute(rest.Route{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func main() {
server := rest.MustNewServer(rest.RestConf{
Host: "localhost",
Port: 4000,
}, rest.WithFileServer("/static", "html"))
}, rest.WithFileServer("/static", http.Dir("html")))
defer server.Stop()

server.AddRoute(rest.Route{
Expand Down

0 comments on commit da7adc0

Please sign in to comment.