Update routes.dart

This commit is contained in:
Tobe O 2018-07-11 09:45:47 -04:00 committed by GitHub
parent 367ea1eb36
commit bdfe205136
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -33,12 +33,14 @@ 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
var vDir = new VirtualDirectory(
app,
fileSystem,
source: fileSystem.directory('web'),
);
app.use(vDir.handleRequest);
if (!app.isProduction) {
var vDir = new VirtualDirectory(
app,
fileSystem,
source: fileSystem.directory('web'),
);
app.use(vDir.handleRequest);
}
// Throw a 404 if no route matched the request.
app.use(() => throw new AngelHttpException.notFound());