webdev_proxy 0.1.0

A simple HTTP proxy for webdev's serve command that adds support for rewriting certain requests, namely rewriting 404s to instead serve the root index (/).

Requirements #

The latest release of webdev_proxy requires the following:

Installation #

webdev_proxy is intended to be "activated" rather than installed as a package dependency.

$ pub global activate webdev_proxy

Learn more about activating and using packages here.

Usage #

webdev_proxy supports one command: serve

webdev_proxy serve #

Run `webdev serve` (a local web development server) behind a proxy that supports HTML5 routing by rewriting not-found requests to index.html.

Usage: webdev_proxy serve [-- [webdev serve arguments]]
-h, --help                 Print this usage information.
    --[no-]rewrite-404s    Rewrite every request that returns a 404 to /index.html
                           (defaults to on)

Run "webdev_proxy help" to see global options.

You may use any of the following options supported by `webdev serve` by passing them after the `--` separator.

webdev serve --help:
====================

Run a local web development server and a file system watcher that rebuilds on changes.

Usage: webdev serve [arguments] [<directory>[:<port>]]...
-h, --help                        Print this usage information.
-o, --output                      A directory to write the result of a build to. Or a mapping from a top-level directory in the package to the directory to write a filtered build output to. For example
                                  "web:deploy".
                                  A value of "NONE" indicates that no "--output" value should be passed to `build_runner`.
                                  (defaults to "NONE")

-r, --[no-]release                Build with release mode defaults for builders.
    --[no-]build-web-compilers    If a dependency on `build_web_compilers` is required to run.
                                  (defaults to on)

-v, --verbose                     Enables verbose logging.
    --auto                        Automatically performs an action after each build:

                                  restart: Reload modules and re-invoke main (loses current state)
                                  refresh: Performs a full page refresh.
                                  [restart, refresh]

    --chrome-debug-port           Specify which port the Chrome debugger is listening on. If used with launch-in-chrome Chrome will be started with the debugger listening on this port.
    --[no-]debug                  Enable the launching of DevTools (Alt + D). Must use with either --launch-in-chrome or --chrome-debug-port.
    --hostname                    Specify the hostname to serve on.
                                  (defaults to "localhost")

    --[no-]launch-in-chrome       Automatically launches your application in Chrome with the debug port open. Use chrome-debug-port to specify a specific port to attach to an already running chrome instance
                                  instead.

    --log-requests                Enables logging for each request to the server.

Run "webdev help" to see global options.

Note that you can configure the underlying webdev serve process by passing any of its supported command-line arguments after the -- separator.

Examples #

To run the default server and proxy:

$ webdev_proxy serve

To pass arguments to webdev serve, e.g. to enable auto-refresh:

$ webdev_proxy serve -- --auto=refresh

0.1.0 #

  • Initial release!

Use this package as an executable

1. Install it

You can install the package from the command line:


$ pub global activate webdev_proxy

2. Use it

The package has the following executables:


$ webdev_proxy
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
50
Learn more about scoring.

We analyzed this package on Jul 18, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.4.0
  • pana: 0.12.19

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in libraries.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.3.0 <3.0.0
args ^1.5.1 1.5.2
glob ^1.1.7 1.1.7
http ^0.12.0 0.12.0+2
http_multi_server ^2.1.0 2.1.0
io ^0.3.3 0.3.3
logging ^0.11.3+2 0.11.3+2
meta ^1.1.7 1.1.7
pedantic ^1.7.0 1.8.0+1
pub_semver ^1.4.2 1.4.2
shelf ^0.7.2 0.7.5
shelf_proxy ^0.1.0 0.1.0+7
stack_trace ^1.9.3 1.9.3
Transitive dependencies
async 2.3.0
charcode 1.1.2
collection 1.14.11
http_parser 3.1.3
path 1.6.2
source_span 1.5.5
stream_channel 2.0.0
string_scanner 1.0.4
term_glyph 1.1.0
typed_data 1.1.6
Dev dependencies
build_runner ^1.5.1
build_web_compilers >=1.2.2 <3.0.0
shelf_static ^0.2.8
sse ^2.0.2
test ^1.6.3
webdriver ^2.0.0

Admin