Update deps for v2

This commit is contained in:
Tobe O 2018-10-02 11:08:23 -04:00
parent 7d2ad74c27
commit e6e0eae332
3 changed files with 14 additions and 22 deletions

View file

@ -15,23 +15,20 @@ main() async {
Uri.parse('package:angel_hot/angel_hot.dart')
]);
var server = await hot.startServer('127.0.0.1', 3000);
print('Hot server listening at http://${server.address.address}:${server
.port}');
print(
'Hot server listening at http://${server.address.address}:${server.port}');
}
Future<Angel> createServer() async {
var app = new Angel();
app.lazyParseBodies = true;
app.serializer = json.encode;
var app = new Angel()..serializer = json.encode;
// Edit this line, and then refresh the page in your browser!
app.get('/', {'hello': 'hot world!'});
app.get('/foo', new Foo(bar: 'baz'));
app.get('/', (req, res) => {'hello': 'hot world!'});
app.get('/foo', (req, res) => new Foo(bar: 'baz'));
app.use(() => throw new AngelHttpException.notFound());
app.fallback((req, res) => throw new AngelHttpException.notFound());
app.injectEncoders({
app.encoders.addAll({
'gzip': gzip.encoder,
'deflate': zlib.encoder,
});

View file

@ -229,8 +229,7 @@ class HotReloader {
if (r == null) {
print(
'WARNING: Unable to watch path "$path" from working directory "${Directory
.current.path}". Please ensure that it exists.');
'WARNING: Unable to watch path "$path" from working directory "${Directory.current.path}". Please ensure that it exists.');
}
}
@ -249,8 +248,7 @@ class HotReloader {
await client.close(WebSocketStatus.goingAway);
} catch (e) {
stderr.writeln(
'Couldn\'t close WebSocket from session #${client.request
.session.id}: $e');
'Couldn\'t close WebSocket from session #${client.request.session.id}: $e');
}
}

View file

@ -1,20 +1,17 @@
name: angel_hot
description: Supports hot reloading of Angel servers on file changes.
version: 1.1.1+1
version: 2.0.0
author: Tobe O <thosakwe@gmail.com>
homepage: https://github.com/angel-dart/hot
environment:
sdk: ">=1.19.0 <3.0.0"
sdk: ">=2.0.0-dev <3.0.0"
dependencies:
angel_framework: ^1.1.0
angel_websocket: ^1.1.0-alpha
dart2_constant: ^1.0.0
angel_framework: ^2.0.0-alpha
angel_websocket: ^2.0.0-alpha
glob: ^1.0.0
html_builder: ^1.0.0
vm_service_lib: ^0.3.5
watcher: ^0.9.0
dev_dependencies:
angel_test: ^1.0.0
http: ^0.11.3
logging: ^0.11.0
test: ^0.12.15
logging: ^0.11.0