Hands-On Server-Side Web Development with Swift
上QQ阅读APP看书,第一时间看更新

Building Your First Web App

This chapter takes you directly to server-side Swift coding with detailed instructions on creating a new web app project from a template provided in the web framework. You'll be guided to create, build, run, and test a Hello World! web app using Vapor 3.0. The files and directories in a typical Vapor web app will be reviewed, and their usages will be further explained. After that, you'll learn how to expand the features of the web app by adding more new routes to handle additional requests from client. You will continue your journey to create a similar Hello World! web app with the Kitura web framework. After going through an exercise showing you how to build a simple web app with both Vapor and Kitura, you'll take note of the similarities between the two web frameworks and appreciate the different approaches taken by them.

Before we move ahead, let's take a look at the topics that will be covered in this chapter:

  • Creating an app using Vapor CLI
  • Reviewing source code in Vapor boilerplate
  • Adding more routes in Vapor
  • Creating an app using Kitura CLI
  • Reviewing source code in Kitura boilerplate
  • Adding more routes in Kitura