November 2018
Intermediate to advanced
404 pages
10h 16m
English
In order to use Leaf template engine in your Vapor project, you're required to configure for it using the Swift Package Manager.
In Package.swift, add the Leaf template engine as one of the package dependencies and include Leaf in the App build target:
// swift-tools-version:4.0import PackageDescriptionlet package = Package( name: "myJournal", dependencies: [ // A server-side Swift web framework. .package(url: "https://github.com/vapor/vapor.git", from: "3.0.0"), // Swift ORM (queries, models, relations, etc) built on SQLite 3. .package(url: "https://github.com/vapor/fluent-sqlite.git", from: "3.0.0"), // Leaf template engine .package(url: "https://github.com/vapor/leaf.git", from: "3.0.0") ], targets: ...
Read now
Unlock full access