From 9cab9d43a6abba50dc9749638d35af329fc85349 Mon Sep 17 00:00:00 2001 From: thosakwe Date: Wed, 21 Sep 2016 01:47:44 -0400 Subject: [PATCH] Changed server script --- bin/server.dart | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bin/server.dart b/bin/server.dart index 8de3ecc..444a875 100644 --- a/bin/server.dart +++ b/bin/server.dart @@ -10,13 +10,13 @@ main() async { } startServer() async { - Angel app = await createServer(); - DateFormat dateFormat = new DateFormat("y-MM-dd"); - InternetAddress host = new InternetAddress(app.properties['host']); - int port = app.properties['port']; - var now = new DateTime.now(); + var app = await createServer(); + var dateFormat = new DateFormat("y-MM-dd"); + var logFile = new File("logs/${dateFormat.format(new DateTime.now())}.txt"); + var host = new InternetAddress(app.properties['host']); + var port = app.properties['port']; - await new DiagnosticsServer(app, new File("logs/${dateFormat.format(now)}.txt")).startServer(host, port); + await new DiagnosticsServer(app, logFile).startServer(host, port); } onError(error, [StackTrace stackTrace]) {