Merge branch 'angel3-basic'

This commit is contained in:
thomashii 2021-07-17 13:08:15 +08:00
commit 8a6bd74bf2

View file

@ -7,8 +7,8 @@ import 'controllers/controllers.dart' as controllers;
/// Put your app routes here!
///
/// See the wiki for information about routing, requests, and responses:
/// * https://github.com/angel-dart/angel/wiki/Basic-Routing
/// * https://github.com/angel-dart/angel/wiki/Requests-&-Responses
/// * https://angel3-docs.dukefirehawk.com/guides/basic-routing
/// * https://angel3-docs.dukefirehawk.com/guides/requests-and-responses
AngelConfigurer configureServer(FileSystem fileSystem) {
return (Angel app) async {
// Typically, you want to mount controllers first, after any global middleware.
@ -25,7 +25,7 @@ AngelConfigurer configureServer(FileSystem fileSystem) {
//
// Read the following two sources for documentation:
// * https://medium.com/the-angel-framework/serving-static-files-with-the-angel-framework-2ddc7a2b84ae
// * https://github.com/angel-dart/static
// * https://pub.dev/packages/angel3_static
if (!app.environment.isProduction) {
var vDir = VirtualDirectory(
app,
@ -41,7 +41,7 @@ AngelConfigurer configureServer(FileSystem fileSystem) {
// Set our application up to handle different errors.
//
// Read the following for documentation:
// * https://github.com/angel-dart/angel/wiki/Error-Handling
// * https://angel3-docs.dukefirehawk.com/guides/error-handling
var oldErrorHandler = app.errorHandler;
app.errorHandler = (e, req, res) async {