Swiftpack.co - Package - Kitura/Kitura

Kitura

A Swift Web Framework and HTTP Server

Docs Build Status - Master macOS Linux Apache 2 codecov codebeat badge Slack Status

Summary

Kitura is a web framework and web server that is created for web services written in Swift. For more information, visit www.kitura.io.

Table of Contents

Features

  • URL routing (e.g., GET, POST, PUT, DELETE, PATCH)
  • Codable routing
  • URL parameters
  • Static file serving
  • FastCGI support
  • SSL/TLS support
  • Pluggable middleware

Getting Started

Visit www.kitura.io for a Getting Started guide, tutorials, and API reference documentation.

Contributing to Kitura

All improvements to Kitura are very welcome! Here's how to get started with developing Kitura itself.

  1. Clone this repository.

$ git clone https://github.com/IBM-Swift/Kitura

  1. Build and run tests.

$ swift test

You can find more info on contributing to Kitura in our contributing guidelines.

Community

We love to talk server-side Swift, and Kitura. Join our Slack to meet the team!

Github

link
Stars: 7418

Releases

2.9.1 - 2019-11-04 10:50:38

  • fix: Support nested types in the generated Swagger document (#1488)

2.9.0 - 2019-10-23 10:23:41

  • feat: Allow customization of the SwaggerDocument (#1483)
  • feat: Ability to limit request size and connection count (#1481)

2.7.2 - 2019-09-06 13:23:29

  • fix: Correctly register Codable paths which contain an explicit :id (#1485)

2.8.1 - 2019-09-06 12:39:23

  • fix: Correctly register Codable paths which contain an explicit :id (#1484)

2.7.1 - 2019-07-08 15:46:10

  • Resolve compilation failures with Swift 5.1 (#1466)

2.8.0 - 2019-08-12 15:21:03

Features

  • Enable Kitura to exit with a non-zero exit code (#1430)
    • note: Kitura.run() will now call exit() to terminate the process with a non-zero status code if any of the listeners fails to start, such as if a requested port is in use. To prevent this, you may specify Kitura.run(exitOnFailure: false).
  • Maintain the URL query when static file server redirects (#1381)
  • Allow servers to listen on a specific address (#1453)
  • Define a Kitura.logTo() function for logging via swift-log (#1460)
  • StaticFileServer fallback option to support single-page applications (#1464)
  • Convenience API for creating cookies (#1468)

Fixes

  • Swift 5.1 support (#1466)
  • Add iOS availability (#1475)

2.7.0 - 2019-04-17 12:56:16

Features

  • Support UNIX domain sockets (client and server) (#1434)

Fixes

  • Update MIME content types (#1441)
  • Swagger/OpenAPI generation improvements (#1420, #1346, #1347)
  • Require TypeDecoder 1.3 on Swift 4.0 and 4.1 (#1439)
  • Build in Swift 5 mode (#1436)
  • Improve test resilience (#1426)
  • Use official Swift Docker images for testing (#1424)
  • Use UTF8View to create Data (#1395)

Performance

  • Remove NSString from Accepts header and cookies (#1402)
  • Avoid NSString in query parameters (#1401)
  • Avoid unnecessary copy in RouterResponse.send() (#1394)

2.6.3 - 2019-04-04 15:53:34

  • fix: Remove hashvalue for swift >= 4.2

2.6.2 - 2019-02-11 14:07:25

  • fix: Prevent crash when an empty Content-Type header is supplied (#1405)

2.6.1 - 2019-01-25 13:31:54

  • Produce a consistent ordering of elements in OpenAPI definition (#1393)
  • Warn when initializing a StaticFileServer on a non-existent path (#1389)

2.6.0 - 2018-12-18 11:26:17

  • Consistent handling of parameters for Codable routes #1310
  • Initialize TypesafeMiddleware first #1350
  • Allow Kitura welcome page to be disabled #1344
  • Performance improvement when sending Strings #1369
  • Conditional GET using etags #1333

2.5.6 - 2018-11-29 15:28:55

  • fix: Handle optional query parameters correctly with Type-Safe Middlewares (#1334)

2.5.0 - 2018-08-30 16:41:49

What's New

  • Enhanced OpenAPI support including query parameters
  • SwiftNIO support (enable using env KITURA_NIO=1 swift build)
  • Pluggable encoders and decoders on Router, used in Codable routing
  • Performance throughput improvements
  • New splash screen
  • Bugfixes

2.4.0 - 2018-06-01 09:14:49

What's New

  • Support for a new kind of type-safe middleware
  • Support for generating Swagger from Codable routes
  • Type-safe templating
  • Tech preview of Kitura on SwiftNIO (see kitura-nio branch)
  • request.getQueryParameters() for decoding query params in Codable routes
  • request.queryParametersMultiValues for easily decoding comma-separated query params
  • response.userInfo dictionary for stashing user data in a response
  • Extra Codable routing API for returning a single Codable from a GET route with query params
  • ParsedBody.asRaw for easy decode of HTTP body data as Data
  • Better error messages on JSON decode failure
  • Swift 4.2 support

2.3.0 - 2018-04-17 13:47:55

What's New

  • Support for sending a Codable body with a RequestError response (#1214)
  • Support for sending arrays of tuples of (Identifier, Codable) - (#1223)
  • new convenience API to simplify development of CodableRouter extensions (#1222)
  • Codable Routing support for URLEncoded forms (#1228)
  • Support for Swift 4.1 (#1230)
  • Bridge KituraNet.HTTPStatusCode (#1217)
  • Declare StaticFileServer API open to allow subclassing (#1245)
  • Documentation improvements

Fixes

  • A fix for memory leaks caused by a failure to invoke callbacks in certain error paths (#1232)

v2.2.0 - 2018-01-30 18:06:05

What's New

v2.1.0 - 2017-12-18 17:07:43

What's New

  • Adds an additional Codable api to supporting a GET handler for non-arrays return types
  • Support for an array mapping in Query Parameters
  • Provides support for Range Requests
  • Migration to Swift 4.0.2

v2.0.0 - 2017-10-27 21:57:44

What's New

  • Migrated the Kitura framework to be a pure Swift 4 package.
  • Improved developer experience by adding new Codable routing support for common HTTP verbs (i.e. GET, PUT, POST, PATCH, DELETE).

1.7.9 - 2017-09-14 15:45:44

What's New

  • Add support for Swift 4
  • Allow the limit on consecutive Keep-Alive requests per connection to be configurable. The default has been changed to allow an unlimited number of requests.

Kitura 1.7 - 2017-04-13 16:09:02

We are delighted to release Kitura 1.7 with:

Kitura 1.6 - 2017-01-27 17:46:53

We are delighted to release Kitura 1.6 with:

  • Significant performance improvements in Kitura route matching
  • Fixes for SSL related contention issues
  • Faster, more comprehensive unit tests covering SSL
  • HeliumLogger enhancement to print to TextOutputStream
  • HTML boilerplate for Kitura-Markdown
  • Fix for unexpected process exit on SIGPIPE
  • Linux foundation memory leak workaround
  • The usual squashed bugs

Kitura 1.5 - 2017-01-27 17:46:33

We are delighted to release Kitura 1.5.

  • Kitura-WebSockets
  • Kitura-Chat-Server
  • Improve test coverage
  • Fix specification compliance for Accept* headers
  • Fixed memory Leak when checking headers
  • Fix issues running tests under code coverage tooling
  • Remove reference loop in Kitura-net
  • Remove use of String.CompareOptions.regularExpression because of memory leak on linux
  • Fix ClientResponse parsing issues

Kitura 1.4 - 2017-01-27 17:46:13

We are delighted to release Kitura 1.4

  • Swift 3.0.2 support
  • PostgreSQL plugin for SQL abstraction layer
  • Rewrite cookie parsing implementation for specification compliance
  • Enable custom UserProfile fields and their retrieval from identity providers
  • Enhance features and performance of HeliumLogger
  • Add a template engine for Markdown
  • Fix some memory issues in Kitura Middleware
  • Avoid URLComponents memory leak on Linux
  • Added and fixed some unit tests
  • Squashed a few bugs

Kitura 1.3 - 2016-12-09 16:05:17

We are delighted to release Kitura 1.3.

Features

  • Many improvements to handling of percent encoding in parameters
  • New monitoring hooks in Kitura-net to enable HTTP performance monitoring
  • New URLComponents property in RouterRequest
  • Significant performance improvements to HeliumLogger
  • Bugfixes

Enjoy!

Kitura 1.2 - 2016-11-17 14:06:13

We are delighted to release Kitura 1.2.

Features

  • Autocompletion and code assist now works properly with Xcode 8.1
  • New router.parameter() methods for easier access to route parameters. See the tests for examples of use.
  • CHTTPParser merged into Kitura-net to reduce git clones
  • Support for mergeParameters to enable subrouters to access matched params defined in the parent router
  • Bugfixes and performance improvements

Enjoy!

Kitura 1.1 - 2016-11-03 14:57:36

We are delighted to release Kitura 1.1. Kitura 1.1 delivers support for Swift 3.0.1.

Features

  • Swift 3.0.1 support
  • A lifecycle manager for Kitura so you can be notified when server startup is complete
  • Bugs squashed

1.0.0 - 2016-09-22 15:04:32

Kitura 1.0

We are delighted to announce the release of Kitura 1.0. Kitura is a high performance and simple to use web framework for building modern Swift applications. It scales out of the box, it is cloud-ready, and it's fun!

Features

  • Flexible routing
  • Pluggable middlewares
  • JSON parsing
  • SSL/TLS
  • FastCGI

Swift Version

Kitura 1.0 runs on Swift 3.0, on both macOS and Ubuntu Linux.

Visit http://www.kitura.io to learn more.

0.32.0 - 2016-09-16 09:59:11

Features

  • Migrate to Swift 3.0
  • Deprecate Kitura-sys, remove the dependency from Kitura-net

Enhancements

  • Performance improvements
  • Improved test coverage

Documentation

  • API documentation written for Kitura-Session, Kitura-Session-Redis, Kitura-Credentials, Kitura-Cache, HeliumLogger, Kitura-Compression, Kitura-CORS, Kitura-CSRF, Kitura-ResponseTime

Swift Version

This release is designed to run on Swift 3.0!

0.30.0 - 2016-09-09 09:32:26

Features

  • Migrate to the 09/07 Swift snapshot
  • GRMustache supported on macOS

Enhancements

  • Performance improvements
  • Memory leaks fixed
  • More scalable on machines with more cores
  • Other miscelaneous bugs fixed

Documentation

  • Wiki guide for working with templates (#685)
  • Generation of API docs for Kitura and Kitura-net (#706)
    • view it at http://ibm-swift.github.io/Kitura/ and http://ibm-swift.github.io/Kitura-net/
    • we happily accept documentation pull requests!

Swift Version

This release is designed to run on Swift DEVELOPMENT-SNAPSHOT-2016-09-07-a

v0.28.0 - 2016-08-31 11:29:28

Features

  • Migrate to the 08/23 Swift snapshot (#702)

Enhancements

  • Add Kitura.start() and Kitura.stop() (#696)
  • Connection: Close header in ClientRequest is now optional (Kitura-net#70, thanks @dsperling)
  • Ability to control allowPartialMatch on Router methods (#688, thanks @naithar)
  • Miscellaneous bug fixes

Documentation

  • Improve doc for developing Kitura apps in Xcode (#552, thanks @saeki)
  • Wiki guide for sessions with Kitura-Session (#647), and authentication with Kitura-Credentials (#649)
  • Generation of API doc and initial skeleton content (#681)
    • view it at http://ibm-swift.github.io/Kitura/ and http://ibm-swift.github.io/Kitura-net/
    • we happily accept documentation pull requests!

Swift Version

This release is designed to run on Swift DEVELOPMENT-SNAPSHOT-2016-08-23-a