# Vapor (web framework)

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Vapor_(web_framework)
> Markdown URL: https://mediated.wiki/source/Vapor_(web_framework).md
> Source: https://en.wikipedia.org/wiki/Vapor_(web_framework)
> Source revision: 1345514104
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

**Vapor** is an [open source](/source/Open-source_software) [web framework](/source/Web_framework) written in [Swift](/source/Swift_(programming_language)) and designed for Swift development. It can be used to create [RESTful](/source/Representational_state_transfer) APIs, web apps, and real-time applications using [WebSockets](/source/WebSocket). In addition to the core framework, Vapor provides an [ORM](/source/Object-relational_mapping), a templating language, and packages to facilitate user [authentication](/source/Authentication) and [authorization](/source/Authorization).[4]

Vapor's [source code](/source/Source_code) is hosted on [GitHub](/source/GitHub) and licensed under the [MIT License](/source/MIT_License).[5] Vapor has been a part of Swift's Server APIs working group since 2016.[6][7]

## History

Vapor 0.1.0 was released as a proof of concept for Swift on the server a month after [Apple](/source/Apple_Inc.) open sourced Swift and began [Linux](/source/Linux) platform support on December 3, 2015.[8] Vapor 1.0[9] arrived in September 2016, followed by the release of Vapor 2.0 in May 2017.[10]

The framework was rewritten for Vapor 3.0[11] to be built on Apple's non-blocking networking framework SwiftNIO. Vapor 3 was released in May 2018. Apple cited the speed with which Vapor (along with [Kitura](/source/Kitura)) adopted the new SwiftNIO framework on the main Swift.org server page.[12]

Vapor 3's beta period saw educational material published by [Packt](/source/Packt),[13][14][15] Paul Hudson,[16] Razeware LLC,[17] and [lynda.com](/source/Lynda.com).[18] Vapor was recognized by Swift.org with an official Swift Forum in its inaugural group of Related Projects[19] in May 2018.

Vapor 4[20]'s Alpha 1 Release started in May 2019 and the stable version released in April 2020.[21]

### Releases

Version Release date Swift version Sep 15, 2016 ≥ 3.0 May 17, 2017 ≥ 3.1 May 4, 2018 ≥ 4.1 April 9, 2020 ≥ 5.2 TBD ≥ TBD

Source: Vapor Docs & GitHub Releases.[22][23]

### Swift version support

Vapor 4 supports the last 3 minor Swift versions. As of October 27th 2023, this includes Swift 5.7, Swift 5.8 and Swift 5.9.

This meets the standards set out by the Swift Server Workgroup,[24] of which Vapor is a member[25]

## Features

Vapor supports the following features:[26]

- Async / non-blocking IO
- Authentication: basic, bearer, [JWT](/source/JSON_Web_Token), and password
- Cache: [Redis](/source/Redis) and in-memory
- Commands / console formatting
- Content negotiation: [JSON](/source/JSON), multipart, and URL-encoded form
- Crypto: [RNG](/source/Random_number_generation), ciphers, digests, [RSA](/source/RSA_(cryptosystem))
- Dependency Injection / Inversion of Control[27]
- Fluent ORM: [MySQL](/source/MySQL),[28] [PostgreSQL](/source/PostgreSQL), [MongoDB](/source/MongoDB) and [SQLite](/source/SQLite)
- [HTTP](/source/HTTP) client and server
- Leaf templating: [HTML](/source/HTML) etc.
- Logging
- URL routing
- Validation
- WebSocket client and server
- Queue jobs

## References

1. ["Vapor 0.1.0 Release"](https://github.com/vapor/vapor/releases/tag/0.1.0). *[GitHub](/source/GitHub)*. 2016-01-25. Retrieved 2018-04-03.

1. ["Server-side Swift Frameworks Comparison"](https://www.netguru.co/codestories/server-side-swift-frameworks-comparison). Retrieved 2018-05-24.

1. ["Vapor 4.102.1 Release"](https://github.com/vapor/vapor/releases/tag/4.102.1). *[GitHub](/source/GitHub)*. 2023-07-10. Retrieved 2024-07-23.

1. ["Vapor GitHub Organization"](https://github.com/vapor). *[GitHub](/source/GitHub)*. Retrieved 2018-04-03.

1. ["vapor/vapor LICENSE at master"](https://github.com/vapor/vapor/blob/master/LICENSE). *[GitHub](/source/GitHub)*. 2018-02-23. Retrieved 2018-04-03.

1. ["Swift Server APIs"](https://web.archive.org/web/20210510193318/https://swift.org/server-apis/). 2016-10-25. Archived from [the original](https://swift.org/server-apis/) on 2021-05-10. Retrieved 2018-05-22.

1. ["Swift Blog: Server APIs Work Group"](https://swift.org/blog/server-api-workgroup/). 2016-10-25. Retrieved 2018-05-22.

1. ["Swift is Open Source"](https://developer.apple.com/swift/blog/?id=34). 2015-12-03. Retrieved 2018-04-03.

1. ["Vapor 1.0.0 Release"](https://github.com/vapor/vapor/releases/1.0.0). *[GitHub](/source/GitHub)*. 2016-09-15. Retrieved 2018-04-03.

1. ["Vapor 2.0.0 Release"](https://github.com/vapor/vapor/releases/2.0.0). *[GitHub](/source/GitHub)*. 2018-05-17. Retrieved 2018-04-03.

1. ["Vapor 3.0.0 released"](https://medium.com/@codevapor/vapor-3-0-0-released-8356fa619a5d). 2018-05-04. Retrieved 2018-05-23.

1. Inc., Apple. ["Swift.org"](https://swift.org/server/). *Swift.org*. Retrieved 2018-10-04.

1. Patel, Ankur (2018-03-30). *Hands-On Full-Stack Development with Swift*. Packt Publishing. ISBN 978-1788625241.

1. Yeung, Angus (2018). [*Hands-On Server-Side Web Development with Swift: Build dynamic web apps by leveraging two popular Swift web frameworks: Vapor 3.0 and Kitura 2.5.*](https://books.google.com/books?id=iC59DwAAQBAJ). Packt Publishing Ltd. ISBN 9781789345865. Retrieved 16 December 2019.

1. Kuepper, Ralph (2020-03-12). *Hands-On Swift 5 Microservice Development*. Packt Publishing. ISBN 978-1789530889.

1. Hudson, Paul (2018-03-01). [*Server-Side Swift*](https://www.hackingwithswift.com/store/server-side-swift). Vapor ed.

1. Condon, Tim et al. [*Server Side Swift with Vapor*](https://store.raywenderlich.com/products/server-side-swift-with-vapor). Razeware LLC.

1. ["Learning Server-Side Swift with Vapor"](https://web.archive.org/web/20210509221704/https://www.lynda.com/Swift-tutorials/Learning-Server-Side-Swift-Vapor/560883-2.html). Archived from [the original](https://www.lynda.com/Swift-tutorials/Learning-Server-Side-Swift-Vapor/560883-2.html) on 2021-05-09. Retrieved 2018-05-22.

1. ["Introducing Related Projects to Swift Forums"](https://swift.org/blog/related-projects/). 2018-05-10.

1. VAPOR (2019-05-28). ["Vapor 4: Alpha 1 Releases Begin"](https://medium.com/@codevapor/vapor-4-alpha-1-releases-begin-94a4bc79dd9a). *Medium*. Retrieved 2019-09-09.

1. ["Release Vapor 4.0.0 · vapor/vapor"](https://github.com/vapor/vapor/releases/tag/4.0.0). *GitHub*. Retrieved 2021-02-15.

1. ["GitHub: vapor/vapor Releases"](https://github.com/vapor/vapor/releases). GitHub. Retrieved 2021-02-15.

1. ["Vapor Docs: Support"](https://web.archive.org/web/20180523173230/https://docs.vapor.codes/3.0/version/support/). Vapor. Archived from [the original](https://docs.vapor.codes/3.0/version/support/) on 2018-05-23. Retrieved 2018-05-04.

1. ["Swift Server Workgoup"](https://www.swift.org/sswg/incubation-process.html#graduation-requirements)

1. ["Swift Server Workgroup Members"](https://www.swift.org/sswg/)

1. ["Vapor Docs"](https://web.archive.org/web/20210722151153/https://docs.vapor.codes/3.0/). *docs.vapor.codes*. Archived from [the original](https://docs.vapor.codes/3.0/) on 2021-07-22. Retrieved 2018-05-22.

1. Elliot, Keith (2016-10-06). [*Swift 3 New Features*](https://books.google.com/books?id=u5jcDgAAQBAJ). Packt Publishing. ISBN 978-1786462718.

1. Hussain, Shaista et al. (2018-03-12). [*Proceedings of the 2018 6th International Conference on Bioinformatics and Computational Biology*](https://dl.acm.org/citation.cfm?id=3194505). Association for Computing Machinery. ISBN 978-1-4503-6348-8.

---
Adapted from the Wikipedia article [Vapor (web framework)](https://en.wikipedia.org/wiki/Vapor_(web_framework)) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Vapor_(web_framework)?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
