November 2018
Intermediate to advanced
404 pages
10h 16m
English
The main.swift file contains the entry point for helloWorld executable target:
// File: /helloWorld/main.swiftimport Foundationimport Kituraimport LoggerAPIimport HeliumLoggerimport Applicationdo { HeliumLogger.use(LoggerMessageType.info) // [1] let app = try App() // [2] try app.run() // [3]} catch let error { Log.error(error.localizedDescription) // [4]}
The do-catch loop in main.swift performs several operations:
Kitura's runtime executes the App instance and its run() function to boot the server. Any errors encountered by the server will be caught in the do-catch loop ...
Read now
Unlock full access