Using Sublimation as a LifecycleHandler for Vapor.
Apple Platforms
- Xcode 16.0 or later
- Swift 6.0 or later
- iOS 17 / watchOS 10.0 / tvOS 17 / macOS 14 or later deployment targets
Linux
- Ubuntu 20.04 or later
- Swift 6.0 or later
To integrate SublimationVapor into your app using SPM, specify it in your Package.swift file:
let package = Package(
...
dependencies: [
.package(url: "https://github.com/brightdigit/SublimationVapor.git", from: "1.0.0")
],
targets: [
.target(
name: "YourServerApp",
dependencies: [
.product(name: "SublimationVapor", package: "SublimationVapor"), ...
]),
...
]
)
For Vapor, you add it to the lifecycle of the app:
let sublimation = Sublimation(
bindingConfiguration: .init(
hosts: hosts,
configuration: configuration.hosting
)
)
var app : Application
app.lifecycle.use(sublimation)
To learn more, check out the full documentation.
This code is distributed under the MIT license. See the LICENSE file for more info.