Skip to content

Commit

Permalink
Port changed to 3000
Browse files Browse the repository at this point in the history
  • Loading branch information
redsolver committed Sep 28, 2019
1 parent c6ca752 commit 5374c0e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/parteiduell_backend.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ run() async {
.toList();

// Starten des Servers
var server = await HttpServer.bind(InternetAddress.anyIPv4, 8080);
var server = await HttpServer.bind(InternetAddress.loopbackIPv4, 3000);
print("Serving at ${server.address}:${server.port}");

await for (var request in server) {
Expand All @@ -56,7 +56,8 @@ execute(HttpRequest request) async {
if (request.uri.path == '/list') {
if (request.method == 'GET') {
quizFragen.shuffle();
response.write(json.encode(quizFragen.take(10).toList()));

request.response.write(json.encode(quizFragen.take(10).toList()));
} else {
response.statusCode = HttpStatus.methodNotAllowed;
}
Expand Down

0 comments on commit 5374c0e

Please sign in to comment.