更新时间:2021-06-10 19:01:21
coverpage
Title Page
About Packt
Why subscribe?
Packt.com
Contributors
About the author
About the reviewer
Packt is searching for authors like you
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Conventions used
Get in touch
Reviews
Introducing Server-Side Swift
Introducing Swift
Open sourcing Swift and components
Swift compiler
Swift standard library
Swift foundation framework
Dispatch framework
XCTest testing framework
Swift Package Manager
LLDB debugger
CommonMark documentation
Bringing Swift to the server-side
SwiftNIO
Surveying Swift server-side frameworks
Vapor
Kitura
Perfect
Choosing the right framework
Performance
Feature sets
Ecosystem
Community support
Summary
Getting Started with Vapor and Kitura
Installing Vapor and Kitura on Mac
Preparing your Mac for server-side Swift development
Installing the Xcode IDE on your Mac
Installing Xcode Command Line Tools
Installing Homebrew
Installing Vapor Toolbox on Mac
Checking your system's compatibility with Vapor
Installing Vapor Toolbox using Homebrew
Verifying Vapor installation
Installing the Kitura CLI on Mac
Installing Vapor and Kitura on Ubuntu
Working with the Ubuntu APT
Installing the Swift Toolchain on Linux
Installing Vapor on Ubuntu
Option 1 – using script to clone Vapor packages
Option 2 – cloning Vapor packages manually
Installing Kitura on Ubuntu
Installing required Linux system packages
Exploring Vapor Toolbox and the Kitura CLI
Using Vapor Toolbox Commands
Getting help on a specific Vapor command
Exploring the Kitura CLI
Using KAG
Selecting a scaffolded application
Choosing additional services
Building Your First Web App
Creating an app using Vapor CLI
Creating a hello world app from a template
Building the hello world app
Running the hello world app
Converting to the Xcode project on a Mac
Reviewing source code in Vapor boilerplate
Adding more routes in Vapor
Creating an app using Kitura CLI
Creating a hello world app from a default template
Running your Kitura app from a Terminal
Running your Kitura app from Xcode
Testing the app with a web browser client
Reviewing source code in Kitura boilerplate
Adding more routes in Kitura
Debugging and Testing
Writing tests for server-side Swift projects
Preparing a test executable target
Writing tests using XCTest
Checking out test cases in a Vapor boilerplate project
Learning useful assertion macros
Adding a unit test to your project
Running unit tests in Xcode
Checking code coverage
Turning on code coverage
Generating a coverage report
Reviewing Kitura boilerplate tests
Handling asynchronous tests