Skip to content

angel-example/static

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

static

Example of serving static files with Angel.

By default, files are served out of web/. In production mode, files will be served out of build/web by default.

The API in charge of this is called VirtualDirectory. To send Cache-Control headers and accept headers such as If-Modified-Since, use its child, CachingVirtualDirectory.

See how to use this with pushstate routing.

import 'package:angel_common/angel_common.dart';

configureStatic(Angel app) async {
  await app.configure(new CachingVirtualDirectory()); // One-line setup
}

About

Example of serving static files with Angel.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published