November 2018
Intermediate to advanced
404 pages
10h 16m
English
Create a new file, JournalItem.swift, for the /Application/Routes/ApiRoutes.swift directory.
In JournalItem.swift, create a struct that implements Model:
import SwiftKueryORMstruct JournalItem: Model { var title: String var content: String}
Since Model itself implements Codable, the JournalItem struct you've defined here will work in the same way as other Codable objects, in addition to its conformance to Kitura-Kuery-ORM.
Read now
Unlock full access