Skip to content

Use IBM's Kitura HTTP server in your Vapor application.

License

Notifications You must be signed in to change notification settings

vapor-community/kitura-provider

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Core

Kitura Provider

Swift Build Status CircleCI Code Coverage Codebeat Slack Status

The Kitura provider for Vapor allows you to use IBM's Kitura HTTP server in your Vapor application.

🚀 Setup

Add the kitura-provider package to your Package.swift.

import PackageDescription

let package = Package(
    name: "VaporApp",
    dependencies: [
        .Package(url: "https://github.com/vapor/vapor.git", majorVersion: 1, minor: 1),
        .Package(url: "https://github.com/vapor/kitura-provider.git", majorVersion: 1, minor: 0),
    ]
)

Note: This package requires Vapor 1.1 or later.

Provider

Once the package is added, you can add the provider to your Droplet.

import Vapor
import VaporKitura

let drop = Droplet()

try drop.addProvider(VaporKitura.Provider.self)

The provider adds a configurable server called "kitura". To use the server, edit your Config/droplet.json file.

{
    "server": "kitura"
}

Manual

If you are not using configuration files, or you would like to hard-code the Kitura server to your Droplet, you can set the server directly.

import Vapor
import VaporKitura

let drop = Droplet()

drop.server = KituraServer.self

📖 Documentation

Visit the Vapor web framework's documentation for more instructions on how to use this package.

💧 Community

Join the welcoming community of fellow Vapor developers in slack.

🔧 Compatibility

This package has been tested on macOS and Ubuntu.