ServerStartArg("8090", documentDirectory[0])
This starts the server, but the application freezes.
Next, tried to do this in background thread
DispatchQueue.global(qos: .background).async {
ServerStartArg("8090", documentDirectory[0])
}
The server starts and the application works. But there is a problem. When application un tray (not opened, but also not closed) server don't respond
And here's is a question: How to start a server without these two problems?