mserve 0.2.3

  • Readme
  • Changelog
  • Installing
  • 24

mserve #

A small (micro) web server.

Build Status pub package

Usage #

Start with mserve or mserve --port=80.

Features and bugs #

Please file feature requests and bugs at the issue tracker.

Changelog #

0.2.3 #

  • fixes for serving DDC compiled content

0.2.2 #

  • updates for Dart 2

0.2.1 #

0.2.0 #

  • change the utility to be package:shelf based

0.1.3 #

  • update our deps, and some updates for Dart 2

0.1.2 #

  • improved the error message when we're unable to bind to the requested port

0.1.1 #

  • added a logging option (--log)

0.1.0 #

  • first release

0.0.1 #

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

2. Use it

The package has the following executables:


$ mserve

Use this package as a library

1. Depend on it

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


dependencies:
  mserve: ^0.2.3

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

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

3. Import it

Now in your Dart code, you can use:


import 'package:mserve/mserve.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
79
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
0
Overall:
Weighted score of the above. [more]
24
Learn more about scoring.

We analyzed this package on Jul 2, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.9+1

Analysis suggestions

Package not compatible with runtime flutter-web of web

Because of the import of dart:io via the import chain package:mserve/mserve.dart->package:mserve/src/packages.dart->dart:io

Package not compatible with runtime web

Because of the import of dart:io via the import chain package:mserve/mserve.dart->package:mserve/src/packages.dart->dart:io

Health suggestions

Fix lib/src/packages.dart. (-10.89 points)

Analysis of lib/src/packages.dart reported 23 hints, including:

line 6 col 1: 'package:package_config/packages_file.dart' is deprecated and shouldn't be used. Use the package_config.json based API.

line 11 col 23: Unnecessary new keyword.

line 13 col 11: Unnecessary new keyword.

line 22 col 14: Unnecessary new keyword.

line 27 col 14: Unnecessary new keyword.

Fix lib/src/directories.dart. (-5.36 points)

Analysis of lib/src/directories.dart reported 11 hints, including:

line 10 col 32: Use = to separate a named parameter from its default value.

line 11 col 23: Unnecessary new keyword.

line 13 col 11: Unnecessary new keyword.

line 32 col 12: Unnecessary new keyword.

line 37 col 18: Unnecessary new keyword.

Fix bin/mserve.dart. (-2.48 points)

Analysis of bin/mserve.dart reported 5 hints:

line 13 col 22: Unnecessary new keyword.

line 21 col 15: Unnecessary new keyword.

line 23 col 9: Unnecessary new keyword.

line 24 col 9: Unnecessary new keyword.

line 35 col 10: Don't explicitly initialize variables to null.

Fix lib/mserve.dart. (-1.99 points)

Analysis of lib/mserve.dart reported 4 hints:

line 26 col 13: Use = to separate a named parameter from its default value.

line 38 col 23: Unnecessary new keyword.

line 40 col 34: Unnecessary new keyword.

line 47 col 12: Unnecessary new keyword.

Fix lib/src/logging.dart. (-1.49 points)

Analysis of lib/src/logging.dart reported 3 hints:

line 11 col 14: Unnecessary new keyword.

line 12 col 14: Unnecessary new keyword.

line 38 col 14: Unnecessary new keyword.

Maintenance issues and suggestions

Support latest dependencies. (-20 points)

The version constraint in pubspec.yaml does not support the latest published versions for 2 dependencies (cli_util, intl).

Package is getting outdated. (-86.03 points)

The package was last published 97 weeks ago.

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and mserve.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev <3.0.0
args ^1.0.0 1.6.0
cli_util ^0.1.3 0.1.4 0.2.0
http_parser ^3.0.0 3.1.4
http_server ^0.9.0 0.9.8+3
intl ^0.15.6 0.15.8 0.16.1
mime ^0.9.6 0.9.6+3
package_config ^1.0.3 1.9.3
path ^1.5.0 1.7.0
shelf ^0.7.2 0.7.7
shelf_static ^0.2.0 0.2.8
Transitive dependencies
async 2.4.1
charcode 1.1.3
collection 1.14.13
convert 2.1.1
meta 1.1.8 1.2.0
source_span 1.7.0
stack_trace 1.9.5
stream_channel 2.0.0
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.2.0
Dev dependencies
test ^1.0.0