Skip to content

brightdigit/SublimationVapor

Repository files navigation

Sublimation

SublimationVapor

Using Sublimation as a LifecycleHandler for Vapor.

SwiftPM Twitter GitHub GitHub issues GitHub Workflow Status

Codecov CodeFactor Grade codebeat badge Code Climate maintainability Code Climate technical debt Code Climate issues\

Table of Contents

Requirements

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

Installation

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"), ...
          ]),
      ...
  ]
)

Usage

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)

Documentation

To learn more, check out the full documentation.

License

This code is distributed under the MIT license. See the LICENSE file for more info.