From 7349c68e7d11fd19ccfac0198798624880a6a68b Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Sun, 9 Aug 2026 05:05:54 +0000 Subject: [PATCH] style: format markdown files with 80-column line wrapping - Wrap markdown prose within 80 columns using Prettier/mdf. - Normalize bullet markers and standardize block whitespace. --- CHANGELOG.md | 33 ++++++++++++++++----------------- README.md | 22 +++++++++++++--------- 2 files changed, 29 insertions(+), 26 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fac00ff..941138a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,10 +5,10 @@ ## 4.2.0 - Added support for `https`. -- Support multiple `--headers` flags and more robust header value parsing. - For example: `--headers="header1=value1;header2=value2"` or +- Support multiple `--headers` flags and more robust header value parsing. For + example: `--headers="header1=value1;header2=value2"` or `--headers="header1=value1" --headers="header2=value2"` -- Added `--list-files` flag to show a directory listing when no `index.html` is +- Added `--list-files` flag to show a directory listing when no `index.html` is present. - Added `--version` flag. - Added clickable link to serve output. @@ -16,8 +16,8 @@ ## 4.1.0 -- Add "headers" option to add additional response headers. - For example: `--headers="header1=value;header2=value;"` +- Add "headers" option to add additional response headers. For example: + `--headers="header1=value;header2=value;"` - Update minimum Dart SDK to `3.0.0`. ## 4.0.1 @@ -40,32 +40,31 @@ ## 3.0.0 -* Set Dart SDK constraint to '>=2.0.0-dev.48.0 <3.0.0'. -* Removed top-level fields `DEFAULT_PORT` and `DEFAULT_HOST` from library. +- Set Dart SDK constraint to '>=2.0.0-dev.48.0 <3.0.0'. +- Removed top-level fields `DEFAULT_PORT` and `DEFAULT_HOST` from library. ## 2.0.0 -* Removed `allow-origin` flag. In reality, this flag never worked because the +- Removed `allow-origin` flag. In reality, this flag never worked because the `shelf` pipeline was not configured correctly. -* Source moved to [github.com/kevmoo/dhttpd](https://github.com/kevmoo/dhttpd). +- Source moved to [github.com/kevmoo/dhttpd](https://github.com/kevmoo/dhttpd). ## 1.0.0 -* No change in functionality, just version and doc tweaks. +- No change in functionality, just version and doc tweaks. ## 0.3.1 -* Fixed bug with setting the path from the command line. -* Start the server with `dhttpd`. +- Fixed bug with setting the path from the command line. +- Start the server with `dhttpd`. ## 0.3.0 -* New `host` command-line flag, to set - the hostname to listen on. Defaults - to `localhost` +- New `host` command-line flag, to set the hostname to listen on. Defaults to + `localhost` ## 0.2.0 -* New `allow-origin` command-line flag for CORS headers. - Thanks to @gmosx for the patch. +- New `allow-origin` command-line flag for CORS headers. Thanks to @gmosx for + the patch. diff --git a/README.md b/README.md index 06203e9..8893725 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ [![CI](https://github.com/kevmoo/dhttpd/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/kevmoo/dhttpd/actions/workflows/ci.yml) [![package publisher](https://img.shields.io/pub/publisher/dhttpd.svg)](https://pub.dev/packages/dhttpd/publisher) -A simple HTTP server that can serve up any directory, built with Dart. -Inspired by `python -m SimpleHTTPServer`. +A simple HTTP server that can serve up any directory, built with Dart. Inspired +by `python -m SimpleHTTPServer`. ## Install @@ -15,8 +15,8 @@ $ dart pub global activate dhttpd ## Use -If you have [modified your PATH][path], you can run this server from any -local directory. +If you have [modified your PATH][path], you can run this server from any local +directory. ```console $ dhttpd @@ -28,8 +28,7 @@ Otherwise you can use the `dart pub global` command. $ dart pub global run dhttpd ``` -Here's an example of creating a web app -and then running it with this server: +Here's an example of creating a web app and then running it with this server: ```console $ dart create -t web web_app @@ -41,14 +40,18 @@ $ dhttpd --path build/web/ # Serves app at http://localhost:8080 ### HTTPS -If you want to use HTTPS you will need to pass in the path of the SSL certificate and the SSL key file as well as the password string, if a password is set on the key, for example: +If you want to use HTTPS you will need to pass in the path of the SSL +certificate and the SSL key file as well as the password string, if a password +is set on the key, for example: ``` $ dart bin/dhttpd.dart --sslcert=example/server_chain.pem --sslkey=example/server_key.pem --sslkeypassword=dartdart Server HTTPS started on port 8080 ``` -See the Dart documentation of [SecurityContext.usePrivateKey](https://api.dart.dev/stable/3.3.3/dart-io/SecurityContext/usePrivateKeyBytes.html) for more details. +See the Dart documentation of +[SecurityContext.usePrivateKey](https://api.dart.dev/stable/3.3.3/dart-io/SecurityContext/usePrivateKeyBytes.html) +for more details. ## Configure @@ -69,4 +72,5 @@ $ dhttpd --help --version Prints the version of dhttpd. ``` -[path]: https://dart.dev/tools/pub/cmd/pub-global#running-a-script-from-your-path +[path]: + https://dart.dev/tools/pub/cmd/pub-global#running-a-script-from-your-path