Swiftpack.co - Package - vapor/vapor

Vapor

Documentation Team Chat MIT License Continuous Integration Swift 4.1 Twitter


Vapor is a web framework for Swift. It provides a beautifully expressive and easy to use foundation for your next website, API, or cloud project.

Take a look at some of the awesome stuff created with Vapor.

💧 Community

Join the welcoming community of fellow Vapor developers on Discord.

🚀 Contributing

To contribute a feature or idea to Vapor, create an issue explaining your idea or bring it up on Discord.

If you find a bug, please create an issue.

If you find a security vulnerability, please contact security@vapor.codes as soon as possible.

💙 Code of Conduct

Our goal is to create a safe and empowering environment for anyone who decides to use or contribute to Vapor. Please help us make the community a better place by abiding to this Code of Conduct during your interactions surrounding this project.

🏫 Tutorials

The awesome Vapor community is always adding new tutorials and articles out there, Vapor University is a great place to get started!

👥 Backers

Support us with a monthly donation and help us continue our activities. [Become a backer]

🥇 Sponsors

Proudly sponsored by Nodes (🏅), Skelpo (🥉), and our Open Collective sponsors.

Nodes
Skelpo

Michael Dominick

analytics

Github

link
Stars: 13914
Help us keep the lights on

Releases

3.0.3 - May 16, 2018

Fixed:

  • Making on(), custom route methods public.
public func on<T>(_ method: HTTPMethod, at path: PathComponentsRepresentable..., use closure: @escaping (Request) throws -> T) -> Route<Responder>
public func on<T>(_ method: HTTPMethod, at path: [PathComponentsRepresentable], use closure: @escaping (Request) throws -> T) -> Route<Responder>

3.0.2 - May 9, 2018

New:

  • New method Request.makeResponse(_:as:) for responding with HTTPBodyLosslessRepresentable content (#1657).
// new API accepts HTTPBodyLosslessRepresentable object
router.get("hello") { req in
    return req.makeResponse("Hello!")
}

// you can also specify a content type
router.get("hello-html") { req in
    return req.makeResponse("Hey!", as: .html)
}

// existing API that accepts non-HTTPBodyLosslessRepresentable content
router.get("hello-json") { req in
    let res = req.makeResponse()
    try res.content.encode(["hello": "world"], as: .json)
    return res
}
  • New method router.on(...) that accepts a non-variadic array of path components (#1658, #1666).

Fixed:

  • BlockingIOThreadPool is now a singleton, shared across all containers (#1665).
  • Middleware is now applied in the correct order when using router.grouped(...) and router.group(...) (#1663).
  • Errors reported to Logger now correctly display the error message (#1660).

API Docs: https://api.vapor.codes/vapor/latest/Vapor

Milestone: 3.0.2

3.0.1 - May 5, 2018

Fixed:

  • SessionsMiddleware no longer aborts when it encounters an invalid cookie (#1656).

Milestone: 3.0.1

3.0.0-rc.2.8 - May 4, 2018

3.0.0-rc.2.8.1 - May 4, 2018