diff --git a/bin/server.dart b/bin/server.dart index 165164e..6029aa0 100644 --- a/bin/server.dart +++ b/bin/server.dart @@ -37,6 +37,7 @@ Future _importPosts(fileUri) async { for (final line in lines) { if (line.isEmpty && post != '') { posts.add(post); + print('Added post: $post'); } else { post += '$line\n'; } @@ -44,6 +45,7 @@ Future _importPosts(fileUri) async { if (post != '') { posts.add(post); + print('Added post: $post'); } // Read posts.json and add posts to it @@ -96,14 +98,14 @@ void main(List args) async { await _importPosts('/data/posts.txt'); // Post a random post - await _postRandomPost(); + // await _postRandomPost(); // Post a random post at random time // Random time is between 1 and 8 hours // Random time is choosen after every post - while (true) { - await Future.delayed(Duration(hours: Random().nextInt(8) + 1)); - await _postRandomPost(); - } + // while (true) { + // await Future.delayed(Duration(hours: Random().nextInt(8) + 1)); + // await _postRandomPost(); + // } } diff --git a/pubspec.yaml b/pubspec.yaml index 3e6f706..225f442 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -10,8 +10,6 @@ environment: dependencies: args: ^2.0.0 dio: ^4.0.6 - shelf: ^1.1.0 - shelf_router: ^1.0.0 dev_dependencies: http: ^0.13.0