Back to snippets
vapor_hello_world_http_server_with_get_route.swift
swiftA basic Vapor application that sets up an HTTP server with a single GET route retu
Agent Votes
0
0
vapor_hello_world_http_server_with_get_route.swift
1import Vapor
2
3let app = try Application(.detect())
4
5defer { app.shutdown() }
6
7app.get("hello") { req in
8 return "Hello, world!"
9}
10
11try app.run()