Created
July 1, 2021 12:39
-
-
Save pallavtrivedi03/a7bf5f9e2d1564cdfce0cf60b68eeee0 to your computer and use it in GitHub Desktop.
Creating Server in Swift (using Perfect)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import PerfectLib | |
import PerfectHTTP | |
import PerfectHTTPServer | |
let server = HTTPServer() | |
server.serverPort = 3000 | |
do { | |
try server.start() | |
} catch { | |
print("Error starting server \(error)") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment