Update deps for v2
This commit is contained in:
parent
7d2ad74c27
commit
e6e0eae332
3 changed files with 14 additions and 22 deletions
|
@ -15,23 +15,20 @@ main() async {
|
||||||
Uri.parse('package:angel_hot/angel_hot.dart')
|
Uri.parse('package:angel_hot/angel_hot.dart')
|
||||||
]);
|
]);
|
||||||
var server = await hot.startServer('127.0.0.1', 3000);
|
var server = await hot.startServer('127.0.0.1', 3000);
|
||||||
print('Hot server listening at http://${server.address.address}:${server
|
print(
|
||||||
.port}');
|
'Hot server listening at http://${server.address.address}:${server.port}');
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<Angel> createServer() async {
|
Future<Angel> createServer() async {
|
||||||
var app = new Angel();
|
var app = new Angel()..serializer = json.encode;
|
||||||
|
|
||||||
app.lazyParseBodies = true;
|
|
||||||
app.serializer = json.encode;
|
|
||||||
|
|
||||||
// Edit this line, and then refresh the page in your browser!
|
// Edit this line, and then refresh the page in your browser!
|
||||||
app.get('/', {'hello': 'hot world!'});
|
app.get('/', (req, res) => {'hello': 'hot world!'});
|
||||||
app.get('/foo', new Foo(bar: 'baz'));
|
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,
|
'gzip': gzip.encoder,
|
||||||
'deflate': zlib.encoder,
|
'deflate': zlib.encoder,
|
||||||
});
|
});
|
||||||
|
|
|
@ -229,8 +229,7 @@ class HotReloader {
|
||||||
|
|
||||||
if (r == null) {
|
if (r == null) {
|
||||||
print(
|
print(
|
||||||
'WARNING: Unable to watch path "$path" from working directory "${Directory
|
'WARNING: Unable to watch path "$path" from working directory "${Directory.current.path}". Please ensure that it exists.');
|
||||||
.current.path}". Please ensure that it exists.');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -249,8 +248,7 @@ class HotReloader {
|
||||||
await client.close(WebSocketStatus.goingAway);
|
await client.close(WebSocketStatus.goingAway);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
stderr.writeln(
|
stderr.writeln(
|
||||||
'Couldn\'t close WebSocket from session #${client.request
|
'Couldn\'t close WebSocket from session #${client.request.session.id}: $e');
|
||||||
.session.id}: $e');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
13
pubspec.yaml
13
pubspec.yaml
|
@ -1,20 +1,17 @@
|
||||||
name: angel_hot
|
name: angel_hot
|
||||||
description: Supports hot reloading of Angel servers on file changes.
|
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>
|
author: Tobe O <thosakwe@gmail.com>
|
||||||
homepage: https://github.com/angel-dart/hot
|
homepage: https://github.com/angel-dart/hot
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=1.19.0 <3.0.0"
|
sdk: ">=2.0.0-dev <3.0.0"
|
||||||
dependencies:
|
dependencies:
|
||||||
angel_framework: ^1.1.0
|
angel_framework: ^2.0.0-alpha
|
||||||
angel_websocket: ^1.1.0-alpha
|
angel_websocket: ^2.0.0-alpha
|
||||||
dart2_constant: ^1.0.0
|
|
||||||
glob: ^1.0.0
|
glob: ^1.0.0
|
||||||
html_builder: ^1.0.0
|
html_builder: ^1.0.0
|
||||||
vm_service_lib: ^0.3.5
|
vm_service_lib: ^0.3.5
|
||||||
watcher: ^0.9.0
|
watcher: ^0.9.0
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
angel_test: ^1.0.0
|
|
||||||
http: ^0.11.3
|
http: ^0.11.3
|
||||||
logging: ^0.11.0
|
logging: ^0.11.0
|
||||||
test: ^0.12.15
|
|
Loading…
Reference in a new issue