O'Reilly logo

Swift Functional Programming - Second Edition by Dr. Fatih Nayebi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Routing

Routing in Vapor is simple as the following:

drop.get("welcome") { request in     return "Hello, World" } 

Adding the preceding code to the main file will make our web application respond to all GET requests to localhost:8080/welcome with the string, Hello, World.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required