dhttpd 2.0.0 copy "dhttpd: ^2.0.0" to clipboard
dhttpd: ^2.0.0 copied to clipboard

outdatedDart 1 only

A static file HTTP server for easy directory serving.

Build Status

A simple HTTP server that can serve up any directory, built with Dart. Inspired by python -m SimpleHTTPServer.

Install #

Use the pub global command to install this into your system.

$ pub global activate dhttpd

Use #

If you have modified your PATH, you can run this server from any local directory.

$ dhttpd

Otherwise you can use the pub global command.

$ pub global run dhttpd

Here's an example of creating a web app with Stagehand and then running it with this server:

$ stagehand web-angular
$ pub get
$ pub build
$ dhttpd --path build/web/  # Serves app at http://localhost:8080

Configure #

  • --port - Set the port. Defaults to 8080.
  • --path - Set the path to serve. Defaults to cwd.
  • --host - Hostname to listen on. Defaults to localhost.
118
likes
15
pub points
83%
popularity

Publisher

verified publisherkevmoo.com

A static file HTTP server for easy directory serving.

Repository (GitHub)
View/report issues

License

BSD-3-Clause (license)

Dependencies

args, shelf, shelf_static

More

Packages that depend on dhttpd