dartnet 0.3.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



  • dart 2 sdk


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

2. Install it

You can install packages from the command line:

with pub:

$ pub get

Alternatively, your editor might support pub 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.3.0 Dec 4, 2018 Go to the documentation of dartnet 0.3.0 Download dartnet 0.3.0 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
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

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

  • Dart: 2.1.0
  • pana: 0.12.7


Detected platforms: other

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

Health issues and suggestions

Document public APIs (-10 points)

48 out of 48 API elements (library, class, field or method) have no adequate dartdoc content. Good documentation improves code readability and discoverability through search.

Fix lib/src/utils.dart. (-5.84 points)

Analysis of lib/src/utils.dart reported 12 hints, including:

line 126 col 37: 'HOST' is deprecated and shouldn't be used.

line 130 col 37: 'VIA' is deprecated and shouldn't be used.

line 153 col 36: 'VIA' is deprecated and shouldn't be used.

line 157 col 42: 'TRANSFER_ENCODING' is deprecated and shouldn't be used.

line 161 col 44: 'CONTENT_ENCODING' is deprecated and shouldn't be used.

Fix lib/src/logger.dart. (-0.50 points)

Analysis of lib/src/logger.dart reported 1 hint:

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

Maintenance suggestions

The description is too short. (-20 points)

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.

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. Packages with multiple examples should use example/readme.md.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
ansicolor ^1.0.2 1.0.2
args ^1.5.1 1.5.1
jaguar ^2.4.0 2.4.12
logging ^0.11.3+2 0.11.3+2
mustache ^1.0.2 1.0.2
path ^1.6.2 1.6.2
resource ^2.1.5 2.1.5
yaml ^2.1.15 2.1.15
Transitive dependencies
auth_header 2.1.2
charcode 1.1.2
collection 1.14.11
convert 2.0.2
crypto 2.0.6
http_server 0.9.8+1
jaguar_common 2.1.4
meta 1.1.6
mime 0.9.6+2
path_tree 2.2.2
source_span 1.4.1
stack_trace 1.9.3
string_scanner 1.0.4
typed_data 1.1.6
Dev dependencies
test ^1.3.0