Changed port from JSON string to JSON integer

This commit is contained in:
Tristan B. Kildaire 2020-07-22 13:02:49 +02:00
parent 4692bcaa36
commit 4339075c8a
2 changed files with 2 additions and 2 deletions

View File

@ -1,5 +1,5 @@
{
"domain" : "10.0.0.9:2222",
"address" : "0.0.0.0",
"port" : "6969"
"port" : 6969
}

View File

@ -22,6 +22,6 @@ void main()
config = parseJSON(cast(string)bytes);
/* Start the server */
Address address = parseAddress(config["address"].str(), to!(ushort)(config["port"].str()));
Address address = parseAddress(config["address"].str(), cast(ushort)config["port"].uinteger());
ButterflyServer server = new ButterflyServer(address, config["domain"].str());
}