dartnet 0.2.0

  • README.md
  • Installing
  • Versions
  • 41


Configurable http server in dart.

  • [ ] For production server
  • [ ] For dev server (pub serve proxy)


pub global activate dartnet




pub run dartnet:dartnet


Usage 'dartnet' :
        -c, --config    (defaults to "dartnet.yaml")
        -h, --help      

        init    Create config file with default value.
                -f, --filename    (defaults to "dartnet.yaml")
        dockerize       Create a Dockerfile from the Dartnet config file
                -f, --filename    (defaults to "dartnet.yaml")


Dartnet use a configuration file (default: 'dartnet.yaml')


address: ""
port: 1337
root_directory: build

This will serve all file under the 'build' directory.


address: "" #default:

port: 1337 #default: 8080

root_directory: web #default: build

multithread: true #default: true

log: info #default: info

log_file: "dartnet.log" #default: dartnet.log

list_directory: false #default: false

gzip: true #default: true

    /: "index.html" #default behavior
    /redirect: "https://www.google.com"
    /**: "index.html"
  404: error.html
  cert: ssl/cert.pem
  key: ssl/key.pem
  password_key: "dartnet"

Run example

cd example



  • Implement Path redirection
  • Config for redirections change, see example in README
  • Add dartnet dockerize command


  • update Jaguar ro 0.4.0


  • dartnet init command: create the default config file


  • Change configuration file, remove "server" key
  • Add gzip compression


  • Add SSL


  • Initial version, created by Stagehand

Use this package as an executable

1. Install it

You can install the package from the command line:

$ pub global activate dartnet

2. Use it

The package has the following executables:

$ dartnet

Use this package as a library

1. Depend on it

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

  dartnet: "^0.2.0"

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:dartnet/dartnet.dart';
Version Uploaded Documentation Archive
0.2.0 Feb 24, 2017 Go to the documentation of dartnet 0.2.0 Download dartnet 0.2.0 archive
0.1.2 Feb 22, 2017 Go to the documentation of dartnet 0.1.2 Download dartnet 0.1.2 archive
0.1.1 Feb 22, 2017 Go to the documentation of dartnet 0.1.1 Download dartnet 0.1.1 archive
0.1.0 Feb 13, 2017 Go to the documentation of dartnet 0.1.0 Download dartnet 0.1.0 archive
0.0.2 Feb 11, 2017 Go to the documentation of dartnet 0.0.2 Download dartnet 0.0.2 archive
0.0.1+2 Feb 11, 2017 Go to the documentation of dartnet 0.0.1+2 Download dartnet 0.0.1+2 archive
0.0.1+1 Feb 11, 2017 Go to the documentation of dartnet 0.0.1+1 Download dartnet 0.0.1+1 archive
0.0.1 Feb 11, 2017 Go to the documentation of dartnet 0.0.1 Download dartnet 0.0.1 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]
91 / 100
Reflects how tidy and up-to-date the package is. [more]
67 / 100
Overall score:
Weighted score of the above. [more]
Learn more about scoring.


Detected platforms: Flutter, other

Primary library: package:dartnet/dartnet.dart with components: io, isolate.


  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 3 errors 2 hints.

    Strong-mode analysis of lib/src/handler.dart failed with the following error:

    line: 4 col: 8
    Target of URI doesn't exist: 'package:glob/glob.dart'.

    Strong-mode analysis of lib/src/logger.dart gave the following hint:

    line: 18 col: 55
    'APPEND' is deprecated and shouldn't be used.

    Similar analysis of the following files failed:

    • lib/src/utils.dart (hint)
  • Package is getting outdated.

    The package was released 68 weeks ago.

  • 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.

  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

  • Maintain an example.

    None of the files in your example/ directory matches a known example patterns. Common file name patterns include: main.dart, example.dart or you could also use dartnet.dart.

  • Use analysis_options.yaml.

    Rename old .analysis_options file to analysis_options.yaml.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.0.0 <2.0.0
ansicolor >=0.0.9 <0.1.0 0.0.9 0.1.0
jaguar >=0.4.0 <0.5.0 0.4.3 2.1.7
jaguar_mustache >=0.4.0 <0.5.0 0.4.0 0.5.0
resource >=2.0.0 <3.0.0 2.1.4
Transitive dependencies
args 0.13.7 1.4.3
charcode 1.1.1
collection 1.14.10
http_server 0.9.7
intl 0.14.0 0.15.6
logging 0.11.3+1
mime 0.9.6+1
mustache 0.2.5+1 1.0.1
path 1.6.1
quiver_hashcode 1.0.0
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 <0.13.0