Created
November 22, 2018 11:01
-
-
Save barsumek/8c1e06c43cac0b2d10c262c81f3cb775 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
function stopHttpServer() { | |
return new Promise(resolve => httpServer.close(() => resolve())); | |
} | |
async function stopGraphQLServer() { | |
if (!httpServer) { | |
console.warn("Tried to close null HTTP server."); | |
return; | |
} | |
await stopHttpServer(); | |
httpServer = null; | |
graphQLServerApp = null; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment