Created
January 11, 2019 16:01
-
-
Save kjessup/f95830dd6572255ebbb1c6799eaa4e41 to your computer and use it in GitHub Desktop.
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 PerfectHTTP | |
import PerfectHTTPServer | |
import PerfectSMTP | |
import PerfectFileMaker | |
let fms = FileMakerServer( host: "127.0.0.1", port: 8180, userName: "username", password: "password" ) | |
fms.databaseNames { | |
result in | |
do { | |
// Get the list of names | |
let names = try result() | |
for name in names { | |
print("Got a database name \(name)") | |
} | |
} catch FMPError.serverError(let code, let msg) { | |
print("Got a server error \(code) \(msg)") | |
} catch let e { | |
print("Got an unexpected error \(e)") | |
} | |
} | |
sleep(10000) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment