Swiftpack.co - Package - vapor/vapor


Documentation Team Chat MIT License Continuous Integration Swift 5.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.


Michael Dominick



Stars: 17045
Help us keep the lights on


4.0.0-alpha.2 - Aug 2, 2019

  • Updated to OpenCrypto alpha 2 (#2031)
  • Updated to SSWG's official AsyncHTTPClient package (#2031)
  • Merged server and client websocket code into WebSocket (#2031)
// client 
return WebSocket.connect(
    to: "ws://echo.websocket.org/",
    on: req.eventLoop
) { ws in
    ws.send("Hello, world!")
    ws.onText { ws, text in
        ws.close().cascadeFailure(to: promise)

// server
router.webSocket("bar") { req, ws in
    ws.send("Hello, world!")
    ws.onText { ws, text in
        ws.close().cascadeFailure(to: promise)
  • BCrypt renamed to Bcrypt and included in Vapor (#2031)
let hash = try Bcrypt.hash("vapor")
print(hash) // $2b$12$Lmw/Zx2jSXgxE.r/8uipROCoh64KdPL7/mdEz38EqEFZDEu5JsAH2
try Bcrypt.verify("vapor", created: hash) // true
try Bcrypt.verify("foo", created: hash) // false

4.0.0-alpha.1.5.1 - Jul 29, 2019

  • Make MiddlewareConfiguration.use non-generic.

4.0.0-alpha.1.5 - Jun 25, 2019


  • Fixes a channel handler assertion when using WebSocket server (#2010, #2009)

4.0.0-alpha.1.4 - Jun 22, 2019


  • Adds a new overload to services.singleton that accepts a shutdown closure for cleanup (#2007)

4.0.0-alpha.1.3 - Jun 19, 2019


  • Client can now modify ClientRequest in a beforeSend closure (.POST can add data)
  • RoutesBuilder now has a delete method