Technology moves fast! ⚡ Don't get left behind.🚶 Subscribe to our mailing list to keep up with latest and greatest in open source projects! 🏆


Subscribe to our mailing list

Examples

Examples using Zewo's linux frameworks

Star full 4f7b624809470f25b6493d5a7b30d9b9cb905931146e785d67c86ef0c205a402Star full 4f7b624809470f25b6493d5a7b30d9b9cb905931146e785d67c86ef0c205a402Star half bd79095782ee4930099175e5ce7f4c89fa3ddabcd56fffcc7c74f6f2a2d46b27Star blank 374f33e4d622a2930833db3cbea26b5d03dc44961a6ecab0b9e13276d97d6682Star blank 374f33e4d622a2930833db3cbea26b5d03dc44961a6ecab0b9e13276d97d6682 (1 ratings)
Rated 2.5 out of 5
Subscribe to updates I use Examples


Statistics on Examples

Number of watchers on Github 26
Number of open issues 2
Main language HTML
Open pull requests 1+
Closed pull requests 0+
Last commit over 3 years ago
Repo Created over 3 years ago
Repo Last Updated about 2 years ago
Size 1.19 MB
Organization / Authorzewograveyard
Contributors2
Page Updated
Do you use Examples? Leave a review!
View open issues (2)
View Examples activity
View on github
Fresh, new opensource launches 🚀🚀🚀
Trendy new open source projects in your inbox! View examples

Subscribe to our mailing list

Evaluating Examples for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)

Examples

Swift 3.0 Platforms Linux License MIT Slack Status

Examples using Zewo's linux frameworks

Demos

  • [x] Server
  • [x] Router
  • [x] Middleware
  • [x] File

Usage

Server

import Zewo

let log = Log()
let logger = LogMiddleware(log: log)

try Server(reusePort: true, middleware: logger) { _ in
    return Response(body: "hello")
}.start()

Router

import Zewo

let router = Router { route in
    route.get("/") { _ in
        return Response(status: .OK, body: "hello")
    }
}

try Server(responder: router).start()

Middleware

import Zewo

let log = Log()
let logger = LogMiddleware(log: log)

let parsers = MediaTypeParserCollection()
parsers.add(JSONMediaType, parser: JSONInterchangeDataParser())
parsers.add(URLEncodedFormMediaType, parser: URLEncodedFormInterchangeDataParser())

let serializers = MediaTypeSerializerCollection()
serializers.add(JSONMediaType, serializer: JSONInterchangeDataSerializer())
serializers.add(URLEncodedFormMediaType, serializer: URLEncodedFormInterchangeDataSerializer())

let contentNegotiation = ServerContentNegotiationMiddleware(
    parsers: parsers,
    serializers: serializers
)

try Server(middleware: logger, contentNegotiation) { _ in
    let content: InterchangeData = [
        "foo": "bar",
        "hello": "world"
    ]

    return Response(content: content)
}.start()

File

import Zewo

try Server(responder: FileResponder(basePath: "public")).start()

Community

Slack

Join us on Slack.

License

Examples are released under the MIT license. See LICENSE for details.

Examples open pull requests (View All Pulls)
  • Add Venice examples & demos
Examples questions on Stackoverflow (View All Questions)
  • C# PDFSharp: Examples of how to strip text from PDF?
  • Superobject JSON parser examples of usage
  • How to understand Qt websockets examples
  • c# helix-toolkit, how to open examples from source
  • Is it possible to use 2 different examples table in Cucumber/Cuke4Duke
  • Regular expressions in C: examples?
  • Common data structure examples
  • Why do PHP Array Examples Leave a Trailing Comma?
  • react-router examples huge-apps: syntax unrecognized by webpack
  • How to implement these github examples?
  • What's the easiest way to play with Material Examples?
  • Material examples crashing on launch
  • CUDA Thread divergence and branches, examples
  • DPLL and Satisfiablity Examples?
  • Documents and examples of PythonMagick
  • Shift-Reduce and Reduce-Reduce examples and one solved examples?
  • AES encryption examples that use an incorrect key size
  • Examples of immutable classes
  • Extending AlertDialogs in Android (where to find examples, how to get title and buttons)
  • Swagger -Examples Object is showing up in Swagger Online Editor but not showing up in Local Swagger Instance(editor)? anyone exp
  • Examples/Tutorials for gloox library
  • What are some examples of Quantum C++ simulations that an undergrad can learn from?
  • Examples of Hierarchical-Model-View-Controller (HMVC)?
  • Access object numbers in examples
  • Can anyone provide me Play Framework , Akka , Scala , MySql examples or project samples to refer?
  • Examples of Applicative Functors in Scala
  • Google test examples for testing libxml2 library
  • What are examples of types that implement only one of Send and Sync?
  • mobile swipe navigation examples
  • where may I find a large set of User Stories examples for a large project?
Examples list of languages used
Other projects in HTML