Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/josephduffy/vapordocc
Vapor middleware that serves a DocC archive
https://github.com/josephduffy/vapordocc
docc swift vapor
Last synced: about 1 month ago
JSON representation
Vapor middleware that serves a DocC archive
- Host: GitHub
- URL: https://github.com/josephduffy/vapordocc
- Owner: JosephDuffy
- Created: 2021-06-10T18:27:30.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-06-11T16:41:45.000Z (over 3 years ago)
- Last Synced: 2024-05-01T19:49:44.491Z (7 months ago)
- Topics: docc, swift, vapor
- Language: Swift
- Homepage: https://vapordocc.josephduffy.co.uk/
- Size: 31.3 KB
- Stars: 23
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# VaporDocC
`VaporDocC` provides middleware for use with [Vapor](https://github.com/vapor/vapor). To initialise the middleware pass in the path to your .doccarchive, e.g.:
```swift
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](https://vapordocc.josephduffy.co.uk/).
## Docker
A docker image that wraps a Vapor app using the `VaporDocCMiddleware` is provided at [ghcr.io/josephduffy/vapordocc](https://github.com/users/JosephDuffy/packages/container/package/vapordocc).
To run locally mount the docs at `/docs`, e.g.:
```shell
docker run -p 8080:8080 -v /path/to/VaporDocC.doccarchive:/docs ghcr.io/josephduffy/vapordocc
```