refactor: refactoring common utilities

This commit is contained in:
Patrick Stewart 2024-12-15 03:56:25 -07:00
parent e25f672a40
commit 6981312866
2 changed files with 3 additions and 3 deletions

View file

@ -34,7 +34,7 @@ var pretty = prettyLog(
printFunction: stderr.writeln,
omitError: (r) {
var err = r.error;
return err is AngelHttpException && err.statusCode != 500;
return err is PlatformHttpException && err.statusCode != 500;
},
);
myLogger.onRecord.listen(pretty);

View file

@ -5,7 +5,7 @@
void main() async {
/*
var app = new Angel();
var http = new AngelHttp(app);
var http = new PlatformHttp(app);
var fs = const LocalFileSystem();
var vDir = new _RangingVirtualDirectory(app, fs.currentDirectory);
app.logger = new Logger('range_header')
@ -22,7 +22,7 @@ void main() async {
..addExtension('yaml', 'text/plain')
..addExtension('yml', 'text/plain');
app.fallback(vDir.handleRequest);
app.fallback((req, res) => throw new AngelHttpException.notFound());
app.fallback((req, res) => throw new PlatformHttpException.notFound());
await http.startServer('127.0.0.1', 3000);
print('Listening at ${http.uri}');
*/