Update routes.dart
This commit is contained in:
parent
367ea1eb36
commit
bdfe205136
1 changed files with 8 additions and 6 deletions
|
@ -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());
|
||||
|
|
Loading…
Reference in a new issue