Vapor Tutorials

We have created a number of tutorials to help you get going with Vapor. These start from the very beginning with getting going with Vapor and will get more and more advanced. If you would like a tutorial about something, send us a tweet!

Leaf Part 1 - Getting Started

Sunday, November 12, 2017 by Tim

This is the sixth tutorial of a series of tutorials on Vapor. For more, click here

Leaf

Up until now, everything we have been doing has been focused on an API and all the requests we have been sending have been sent through a REST client. This is great for iOS apps (and other mobile clients) but at some point we are going to want to have a presence on the web and a way of using the application through a website. We can serve HTML files via Vapor relatively easily but we will want a way to display content from our application. The way to achieve this is to use a templating language where we can use a template to display different things of the same type - for instance, a template to display a reminder. Vapor has it's own templating language, Leaf and in this tutorial we will learn how to use it!