Created
October 10, 2020 09:34
-
-
Save andrijac/2d16071df25aeaff72929a40663369f4 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
Future main() async { | |
var server = await HttpServer.bind( | |
InternetAddress.loopbackIPv4, | |
4040, | |
); | |
print('Listening on localhost:${server.port}'); | |
await for (HttpRequest request in server) { | |
request.response.write('Hello, world!'); | |
await request.response.close(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment