Last active
September 30, 2021 17:45
-
-
Save enyo/64ae6dfca6389243899f55b3328ca8ac to your computer and use it in GitHub Desktop.
Writing server side Dart code
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
import 'dart:io'; | |
main() async { | |
final server = await HttpServer.bind(InternetAddress.anyIPv6, 80); | |
server.listen((HttpRequest request) { | |
request.response.write('Hello, world!'); | |
request.response.close(); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment