Vapor

Vapor

30 posts

· 2 min read

Running and testing async Vapor commands


In this article I'll show you how to build asynchronous Vapor commands and how to test them using ConsoleKit.

· 4 min read

The abstract Vapor service factory design pattern


In this tutorial I'm going to show you how you can create an abstract driver-based component for the Vapor framework.

· 7 min read

The repository pattern for Vapor 4


In this article I'm going to talk about the repository design pattern and give you a few Fluent ORM tips for your Vapor 4 app.

· 5 min read

How to write HTML in Swift?


This tutorial is all about rendering HTML docs using a brand new DSL library called SwiftHtml and the Vapor web framework.

· 5 min read

The future of server side Swift


What's going to happen with Swift on the Server in 2022? Distributed actors, Vapor 5, some predictions and wishes.

· 4 min read

Building a global storage for Vapor


This tutorial is about a shared global storage that you can implement using a common design pattern in Vapor 4.

· 7 min read

Beginner's guide to the async/await concurrency API in Vapor & Fluent


Learn how to convert your existing EventLoopFuture based Vapor server app using the new async/await Swift feature.

· 8 min read

Declarative unit tests for Vapor


Learn how to test your server side Swift backend app in a declarative style using a lightweight library called Spec.

· 9 min read

How to design type safe RESTful APIs using Swift & Vapor?


Learn to make proper data transfer objects for CRUD operations and integrate them both into the client and server side API layer.

· 5 min read

File upload API server in Vapor 4


Learn how to build a very simple file upload API server using Vapor 4 and URLSession upload task on the client side.

· 5 min read

AJAX calls using Vapor 4


Learn how to implement Asynchronous JavaScript and XML (AJAX) calls using Leaf templates and Vapor 4 as a server.

· 6 min read

File upload using Vapor 4


Learn how to implement a basic HTML file upload form using the Leaf template engine and Vapor, all written in Swift of course.

· 8 min read

Swift on the Server in 2020


Why choose Swift as a backend language in 2020? What are the available frameworks to build your server? Let me guide you.

· 5 min read

10 short advices that will make you a better Vapor developer right away


As a beginner server side Swift developer you'll face many obstackles. I'll show you how to avoid the most common ones.

· 2 min read

How to store keys in env files?


In this tutorial I'll show you how to save and load secret keys as base64 encoded strings using dotenv files in Vapor 4.

· 5 min read

Table joins in Fluent 4


In this quick tutorial I'm going to show you how to join and query database models using the Fluent ORM framework in Vapor 4.

· 13 min read

Websockets for beginners using Vapor 4 and Vanilla JavaScript


Learn how to create a websocket server using Swift & Vapor. Multiplayer game development using JavaScript in the browser.

· 11 min read

Sign in with Apple using Vapor 4


A complete tutorial for beginners about how to implement the Sign in with Apple authentication service for your website.

· 8 min read

Server side Swift projects inside Docker using Vapor 4


Learn how to setup Vapor 4 projects inside a Docker container. Are you completely new to Docker? This article is just for you.

· 16 min read

All about authentication in Vapor 4


Learn how to implement a user login mechanism with various auth methods using sessions, JWTs, written in Swift only.

· 10 min read

A generic CRUD solution for Vapor 4


Learn how to build a controller component that can serve models as JSON objects through a RESTful API written in Swift.

· 3 min read

The anatomy of Vapor commands


Learn how to build and run your existing Vapor apps using various command line arguments, flags and environments.

· 4 min read

How to use middlewares in Vapor 4?


Learn how to create middlewares for a Vapor based server side Swift application to handle common routing functionalities.

· 5 min read

How to write Swift scripts using the new Command API in Vapor 4?


Shell scripts are essentials on the server side. Learn how to build Swift scripts for your backend apps using property wrappers.

· 15 min read

Get started with the Fluent ORM framework in Vapor 4


Learn how to use the Fluent ORM framework. Migrations, schemas, relations powered by PostgreSQL, written in Swift.

· 2 min read

How to set up pgSQL for Fluent 4?


This is a tutorial for beginners about using PostgreSQL. I'll show you how to automatically backup and restore the database.

· 18 min read

Beginner's guide to Server side Swift using Vapor 4


Learn how to build and host your very first backend application using Vapor 4 and the brief history of server side Swift.

· 4 min read

A simple HTTP/2 server using Vapor 4


Get started with server-side Swift using the Vapor 4 framework. Learn how to build a really simple HTTP/2 backend server.

· 4 min read

What's new in Vapor 4?


Vapor is the most popular server side Swift web application framework. This time we'll cover what's new in Vapor 4.

· 13 min read

Asynchronous validation for Vapor


Learn how to validate input data using an async technique. Unified request validation API for your server side Swift app.