Vapor is an
open source
Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use the source code, design documents, or content of the product. The open-source model is a decentralized sof ...
web framework written in
Swift. It can be used to create
RESTful APIs, web apps, and real-time applications using
WebSockets. In addition to the core framework, Vapor provides an
ORM, a templating language, and packages to facilitate user
authentication and
authorization.
Vapor's
source code is hosted on
GitHub and licensed under the
MIT License. Vapor has been a part of Swift's Server APIs working group since 2016.
History
Vapor 0.1.0 was released as a proof of concept for Swift on the server a month after
Apple open sourced Swift and began
Linux platform support on December 3, 2015. Vapor 1.0 arrived in September 2016, followed by the release of Vapor 2.0 in May 2017.
The framework was rewritten for Vapor 3.0 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
Kitura is a free and open-source web framework written in Swift, developed by IBM and licensed under Apache License 2.0. It’s an HTTP server and web framework for writing Swift server applications.
In December 2019, IBM announced it had no f ...
) adopted the new SwiftNIO framework on the main Swift.org server page.
Vapor 3's beta period saw educational material published by
Packt, Paul Hudson, Razeware LLC, and
lynda.com. Vapor was recognized by Swift.org with an official Swift Forum in its inaugural group of Related Projects in May 2018.
Vapor 4's Alpha 1 Release started in May 2019 and the stable version released in April 2020.
Releases
Source: Vapor Docs & GitHub Releases.
Features
Vapor supports the following features:
* Async / non-blocking IO
* Authentication: basic, bearer,
JWT, and password
* Cache:
Redis
Redis (; Remote Dictionary Server) is an in-memory data structure store, used as a distributed, in-memory key–value database, cache and message broker, with optional durability. Redis supports different kinds of abstract data structures, su ...
and in-Memory
* Commands / console formatting
* Content Negotiation:
JSON
JSON (JavaScript Object Notation, pronounced ; also ) is an open standard file format and data interchange format that uses human-readable text to store and transmit data objects consisting of attribute–value pairs and arrays (or other ser ...
, multipart, and URL-encoded form
* Crypto:
RNG, ciphers, digests,
RSA
* Dependency Injection / Inversion of Control
* Fluent ORM:
MySQL,
PostgreSQL
PostgreSQL (, ), also known as Postgres, is a free and open-source relational database management system (RDBMS) emphasizing extensibility and SQL compliance. It was originally named POSTGRES, referring to its origins as a successor to the In ...
, and
SQLite
*
HTTP Client and Server
* Leaf Templating:
HTML etc
* Logging
* URL Routing
* Validation
* WebSocket client and server
* Queue Jobs
References
{{reflist
Web frameworks