pub_serve_rewrites 0.0.1 copy "pub_serve_rewrites: ^0.0.1" to clipboard
pub_serve_rewrites: ^0.0.1 copied to clipboard

Dart 1 only

Helps pub serve to support apps using HTML5 pushState for navigation during development.

example/main.dart

// Copyright (c) 2016, <your name>. All rights reserved. Use of this source code
// is governed by a BSD-style license that can be found in the LICENSE file.

library rewrites.example;

import 'package:pub_serve_rewrites/rewrites.dart';

main() => server()
  ..ignoreAll([r'^(\S+\.(json|html|js|dart|css|png))$',])
  ..rewrite(r'/admin/(.*)',to: '/admin.html')
  ..rewrite(r'(.*)', to: '/index.html')
  ..start('http://localhost:8080');
0
likes
25
points
3
downloads

Publisher

unverified uploader

Weekly Downloads

Helps pub serve to support apps using HTML5 pushState for navigation during development.

License

MIT (license)

Dependencies

shelf_proxy

More

Packages that depend on pub_serve_rewrites