Merge pull request #380 from bellebethcooper/patch-1

Add mention of the need to enable FileMiddleware
This commit is contained in:
Tim 2019-01-07 09:37:39 +00:00 committed by GitHub
commit a120691065
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -38,6 +38,10 @@ the file immediately.
For example, a request to `localhost:8080/favicon.ico` will check to see
if `Public/favicon.ico` exists. If it does, Vapor will return it.
You will need to enable `FileMiddleware` in your `configure.swift` file before Vapor can return public files. Make sure you've uncommented this line:
`middlewares.use(FileMiddleware.self)`
## Sources
This folder contains all of the Swift source files for your project.
@ -96,4 +100,4 @@ Learn more about testing in [Testing → Getting Started](../testing/getting-
## Package.swift
Finally is SPM's [package manifest](spm.md#package-manifest).
Finally is SPM's [package manifest](spm.md#package-manifest).