serve 1.0.4

  • Installing
  • Versions
  • 50


CLI to serves static files in a directory. Simpler to Python's python -m SimpleHTTPServer.


pub global activate serve

Serve files in current directory


This command by default serves content of current directory on port 8080 and host

Configure host and port

Use --host (abbreviation -h) and --port (abbreviation -p) to serve on desired host and port.

serve -h localhost -p 8081

Serve content of specific directory

Use --dir (abbreviated as -d) to serve contents of a desired directory.

serve -d /home/myname/mysite

Serve at a given base path

Use --base-path (abbreviated as -b) to serve contents with desired base path.

serve -b /myblog

More features to come!



  • Respects index.html


  • HTTPS support


  • Serve


  • Args

Use this package as an executable

1. Install it

You can install the package from the command line:

$ pub global activate serve

2. Use it

The package has the following executables:

$ serve

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  serve: "^1.0.4"

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

      import 'package:serve/serve.dart';
Version Uploaded Documentation Archive
1.0.4 Feb 2, 2018 Go to the documentation of serve 1.0.4 Download serve 1.0.4 archive
1.0.3 Jan 24, 2018 Go to the documentation of serve 1.0.3 Download serve 1.0.3 archive
1.0.2 Jan 16, 2018 Go to the documentation of serve 1.0.2 Download serve 1.0.2 archive
1.0.1 Jan 15, 2018 Go to the documentation of serve 1.0.1 Download serve 1.0.1 archive
1.0.0 Jan 15, 2018 Go to the documentation of serve 1.0.0 Download serve 1.0.0 archive


We analyzed this package on Jun 19, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.63.0
  • pana: 0.11.3


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


Detected platforms: Flutter, web, other

No platform restriction found in primary library package:serve/serve.dart.


  • The description is too short.

    Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

  • Maintain an example.

    Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use serve.dart.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.20.1 <2.0.0
args ^1.2.0 1.4.3
jaguar ^1.3.4 1.3.11 2.1.7
path ^1.5.1 1.6.1
Transitive dependencies
charcode 1.1.1
collection 1.14.10
convert 2.0.1
crypto 2.0.5
http_server 0.9.7
logging 0.11.3+1
meta 1.1.5
mime 0.9.6+1
source_span 1.4.0
stack_trace 1.9.2
string_scanner 1.0.2
typed_data 1.1.5
yaml 2.1.14
Dev dependencies
test ^0.12.0