Closed mojavelinux closed 5 years ago
Awesome! @mojavelinux would you mind making close return a promise? so we can just do:
await server.close()
Sure thing!
I changed it so that if no callback is specified, the method returns a promise.
@mojavelinux it seems like extra work to support both methods, would be able to just to keep it to returning a promise?
Sure, I suppose. I guess that's more of a question for you. Is the goal to mimic the API of the HTTP server or simply provide a way to close the server? If the goal is just to provide a way to close the server, then we can change it to just return a promise (even though that differs from the listen API). I was just trying to be consistent.
Done!
thanks!
resolves #45