VaporDocC

0.1.0

Vapor middleware that serves a DocC archive
JosephDuffy/VaporDocC

What's New

v0.1.0

2021-06-11T16:43:11Z
  • Support redirecting requests for the root (“/“)
  • Support redirecting requests with missing trailing slashes to include trailing slashes

VaporDocC

VaporDocC provides middleware for use with Vapor. To initialise the middleware pass in the path to your .doccarchive, e.g.:

let archiveURL = URL(fileURLWithPath: "/path/to/VaporDocC.doccarchive")
app.middleware.use(VaporDocCMiddleware(archivePath: archiveURL))

Documentation – hosted by the docker image included in this repo – is available at vapordocc.josephduffy.co.uk.

Docker

A docker image that wraps a Vapor app using the VaporDocCMiddleware is provided at ghcr.io/josephduffy/vapordocc.

To run locally mount the docs at /docs, e.g.:

docker run -p 8080:8080 -v /path/to/VaporDocC.doccarchive:/docs ghcr.io/josephduffy/vapordocc

Description

  • Swift Tools 5.5.0
View More Packages from this Author

Dependencies

Last updated: Wed Mar 27 2024 22:48:26 GMT-0900 (Hawaii-Aleutian Daylight Time)