Skip to content

Commit 9735b8e

Browse files
Fennygitbook-bot
authored andcommitted
GitBook: [master] one page modified
1 parent b4b8b4b commit 9735b8e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,16 +119,15 @@ To serve static files such as **images**, **CSS** and **JavaScript** files, repl
119119
Function signature:
120120

121121
```go
122-
app.Static(root string) // => without prefix
123-
app.Static(prefix, root string) // => with prefix
122+
app.Static(prefix, root string)
124123
```
125124

126125
Use the following code to serve files in a directory named `./public`:
127126

128127
```go
129128
app := fiber.New()
130129

131-
app.Static("./public") // => Serve all files into ./public
130+
app.Static("/", "./public") // => Serve all files into ./public
132131

133132
app.Listen(8080)
134133
```

0 commit comments

Comments
 (0)