2019-02-06 21:32:40 +00:00
|
|
|
import 'dart:isolate';
|
2017-06-06 12:07:59 +00:00
|
|
|
import 'package:angel_framework/angel_framework.dart';
|
|
|
|
import 'package:angel_hot/angel_hot.dart';
|
|
|
|
|
2019-02-06 21:32:40 +00:00
|
|
|
main(_, [SendPort sendPort]) {
|
|
|
|
return runHot(sendPort, (client) {
|
|
|
|
var app = Angel();
|
2017-06-06 12:07:59 +00:00
|
|
|
|
2019-02-06 21:32:40 +00:00
|
|
|
if (client != null) {
|
|
|
|
// Specify which paths to listen to.
|
|
|
|
client.watchPaths([
|
|
|
|
'src',
|
|
|
|
'main.dart',
|
|
|
|
'package:angel_hot/angel_hot.dart',
|
|
|
|
]);
|
2017-06-06 12:07:59 +00:00
|
|
|
|
2019-02-06 21:32:40 +00:00
|
|
|
// When the top-level triggers a hot reload, shut down the existing server.
|
|
|
|
client.onReload.listen((reload) {
|
2017-10-19 18:32:41 +00:00
|
|
|
|
2019-02-06 21:32:40 +00:00
|
|
|
});
|
|
|
|
}
|
2017-10-19 18:32:41 +00:00
|
|
|
});
|
2017-06-06 12:07:59 +00:00
|
|
|
}
|