diff --git a/bin/dev.dart b/bin/dev.dart index 802864a..a2c4df3 100644 --- a/bin/dev.dart +++ b/bin/dev.dart @@ -8,17 +8,19 @@ import 'package:logging/logging.dart'; main() async { // Watch the config/ and web/ directories for changes, and hot-reload the server. - var hot = new HotReloader(() async { - var app = new Angel(reflector: MirrorsReflector()); + hierarchicalLoggingEnabled = true; + + var hot = HotReloader(() async { + var logger = Logger.detached('{{angel}}')..onRecord.listen(prettyLog); + var app = Angel(logger: logger, reflector: MirrorsReflector()); await app.configure(configureServer); - hierarchicalLoggingEnabled = true; - app.logger = new Logger.detached('{{angel}}')..onRecord.listen(prettyLog); return app; }, [ - new Directory('config'), - new Directory('lib'), + Directory('config'), + Directory('lib'), ]); var server = await hot.startServer('127.0.0.1', 3000); - print('{{angel}} server listening at http://${server.address.address}:${server.port}'); + print( + '{{angel}} server listening at http://${server.address.address}:${server.port}'); }