Code Monkey home page Code Monkey logo

kitura-nio's Introduction

Kitura

Swift 4.2 Docs Build Status - Master macOS Linux Apache 2 Slack Status

Kitura-NIO

Kitura-NIO is a SwiftNIO based networking library for Kitura. Kitura-NIO adopts the same API as KituraNet, making the transition from KituraNet to Kitura-NIO seamless. While Kitura-NIO shares some code with Kitura-Net, the core comprising of HTTPServer, ClientRequest/ClientResponse and TLS support have been implemented using SwiftNIO. Kitura-NIO uses NIOOpenSSL for TLS support.

We expect most of our users to require higher level concepts such as routing, templates and middleware, these are not provided in Kitura-NIO, if you want to use those facilities you should be coding at the Kitura level, for this please see the Kitura project. Kitura-NIO, like Kitura-net, underpins Kitura which offers a higher abstraction level to users.

Kitura-NIO works with Swift 4.2. It is also being tested with the development binaries for Swift 5.

Features

  • Port Listening
  • HTTP Server support (request and response)

Using Kitura-NIO

With Kitura 2.5 and future releases, to run on top of Kitura-NIO (instead of Kitura-Net) all you need to do is set an environment variable called KITURA_NIO before building your Kitura appilication:

    export KITURA_NIO=1 && swift build

If you have already built your Kitura application using Kitura-Net and want to switch to using KITURA_NIO, you need to update the package before building:

    export KITURA_NIO=1 && swift package update && swift build

Using the environment variable we make sure that only one out of Kitura-NIO and Kitura-Net is linked into the final binary.

Please note that though Kitura-NIO has its own GitHub repository, the package name is KituraNet. This is because the Kitura-NIO and Kitura-Net are expected to provide identical APIs, and it make sense if they share the package name too.

Getting Started

Visit www.kitura.io for reference documentation.

Contributing to Kitura-NIO

We'd be more than happy to receive bug reports, enhancement requests and pull requests!

  1. Clone this repository.

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

  1. Build and run tests.

$ swift test

You may also want to run the tests in parallel: $ swift test --parallel

In some Linux environments, a low open file limit could cause test failures. See this.

Community

We'd really love to hear feedback from you.

Join the Kitura on Swift Forums or our Slack to meet the team!

License

This library is licensed under Apache 2.0. Full license text is available in LICENSE.

kitura-nio's People

Contributors

nethraravindran avatar djones6 avatar saihemak avatar ianpartridge avatar swiftdevops avatar kant avatar helenmasters avatar vipinmenon avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.