A simple HTTP server that can serve up any directory, built with Dart

Last update: Dec 27, 2021

Pub Package CI

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

Install

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

$ dart 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 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:

$ dart create -t web-simple web-app
$ cd web-app
$ dart pub get
$ dart run build_runner build -o build
$ dhttpd --path build/web/  # Serves app at http://localhost:8080

Configure

$ dhttpd --help
-p, --port=<port>    The port to listen on.
                     (defaults to "8080")
    --path=<path>    The path to serve. If not set, the current directory is used.
    --host=<host>    The hostname to listen on.
                     (defaults to "localhost")
-h, --help           Displays the help.

GitHub

https://github.com/ariscybertech/aris_dhttpd
You might also like...

A lightweight and customizable http client that allows you to create offline-first dart app easily.

Enjoyable & customizable offline-first REST API client Unruffled is lightweight and customizable http client that allows you to create offline-first e

May 20, 2022

Buildpack dart - A server app built using Shelf, configured to enable running with Docker

Hosted at https://dart-buildpack-demo-ruyjilv5wq-uc.a.run.app/ Buildpack defined

Aug 9, 2022

A simple Git LFS server implementation in Dart

A simple Git LFS server implementation in Dart Overview Git LFS client (git-lfs or git lfs command) requires a dedicated LFS-content server (not the G

May 11, 2022

Dart-com-Shelf - Web server básico feito com dart e shelf, configurações de rotas e conexão com mysql.

A server app built using Shelf, configured to enable running with Docker. This sample code handles HTTP GET requests to / and /echo/message Running

Jan 3, 2022

Socketio dart server and client - Full Socket.io implementation using Dart Lang

Socketio dart server and client - Full Socket.io implementation using Dart Lang

Getting Started Step 1: Run dart_server.dart Step 2: Android Emulator has proble

Jan 23, 2022

Academic master is E-learning app where students can share their doubts wiith their peers they can chat and also they can find their notes

Academic master is E-learning app where students can share their doubts wiith their peers they can chat and also they can find their notes

Academic Master is E-learning App. Features:- 1) You can post real Post query in Images and video formates. 2) We will Provide notes,books and previou

Jun 30, 2022

This is Personal Expenses Planner. You can see and made any recipes from this application. I developed this project using flutter.

meals A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if this is

Jul 6, 2022

A platform for car sharing where users can book any car that suits their needs and wants for their intended journey, from the closest hosts in the community.

A platform for car sharing where users can book any car that suits their needs and wants for their intended journey, from the closest hosts in the community.

Getting Started This project is a starting point for a Flutter application. For help getting started with Flutter, view our online documentation, whic

Apr 29, 2022

Related

App HTTP Client is a wrapper around the HTTP library Dio to make network requests and error handling simpler, more predictable, and less verbose.

App HTTP Client App HTTP Client is a wrapper around the HTTP library Dio to make network requests and error handling simpler, more predictable, and le

Aug 4, 2022
Charlatan - A library for configuring and providing fake http responses to your dio HTTP client.

charlatan This package provides the ability to configure and return fake HTTP responses from your Dio HTTP Client. This makes it easy to test the beha

Aug 8, 2022
Powerful, helpfull, extensible and highly customizable API's that wrap http client to make communication easier with Axelor server with boilerplate code free.
Powerful, helpfull, extensible and highly customizable API's that wrap http client to make communication easier with Axelor server with boilerplate code free.

flutter_axelor_sdk Powerful, helpful, extensible and highly customizable API's that wrap http client to make communication easier with Axelor server w

Nov 12, 2021
An app to show everything bus related in Singapore, including arrival times and a directory
An app to show everything bus related in Singapore, including arrival times and a directory

NextBus SG An app to show everything bus related in Singapore, including bus arrival times and a directory, with extra features. ?? Gallery Click here

Aug 7, 2022
State Persistence - Persist state across app launches. By default this library store state as a local JSON file called `data.json` in the applications data directory. Maintainer: @slightfoot

State Persistence Persist state across app launches. By default this library store state as a local JSON file called data.json in the applications dat

Dec 23, 2021
A powerful Http client for Dart, which supports Interceptors, FormData, Request Cancellation, File Downloading, Timeout etc.

dio_http A powerful Http client for Dart, which supports Interceptors, Global configuration, FormData, Request Cancellation, File downloading, Timeout

Dec 19, 2021
A powerful Http client for Dart, which supports Interceptors, FormData, Request Cancellation, File Downloading, Timeout etc.
A powerful Http client for Dart, which supports Interceptors, FormData, Request Cancellation, File Downloading, Timeout etc.

Language: English | 中文简体 dio A powerful Http client for Dart, which supports Interceptors, Global configuration, FormData, Request Cancellation, File

Aug 12, 2022
A Dart package to handle HTTP services

http_services A package to support the creation of Http services in a Dart application. Features convenient methods to perform HTTP requests disposing

Jul 27, 2021
A composable API for making HTTP requests in Dart.

A composable, Future-based library for making HTTP requests. This package contains a set of high-level functions and classes that make it easy to cons

Aug 17, 2022
A middleware library for Dart's http library.

http_middleware A middleware library for Dart http library. Getting Started http_middleware is a module that lets you build middleware for Dart's http

Oct 23, 2021