simple_server 0.2.1

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 30

SimpleServer

Installation

Add it to your dependencies

dependencies:
  simple_server: any

and install the package

$ pub get

Usage

import 'dart:io';
import 'package:simple_server/simple_server.dart';
main() async {
    server = new SimpleServer("/", "/docroot");
    bool serverStarted = await server.start();

    if (serverStarted == true) {
        /* Web pages */
        server.route(url: "/",      responser: new FileResponse("docroot/index.html"))
        ..go();
    }
}

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Credits

Robert Beyer 4sternrb@googlemail.com

License

MIT

0.2.1 (2015-10-21)

  • increase debs

0.1.1 (2015-09-07)

  • add port getter

0.1.0 (2015-09-07)

  • project start

1. Depend on it

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


dependencies:
  simple_server: "^0.2.1"

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 packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:simple_server/simple_server.dart';
        
Version Uploaded Documentation Archive
0.2.1 Oct 21, 2015 Go to the documentation of simple_server 0.2.1 Download simple_server 0.2.1 archive
0.2.0 Oct 16, 2015 Go to the documentation of simple_server 0.2.0 Download simple_server 0.2.0 archive
0.1.1 Sep 7, 2015 Go to the documentation of simple_server 0.1.1 Download simple_server 0.1.1 archive
0.1.0 Sep 7, 2015 Go to the documentation of simple_server 0.1.0 Download simple_server 0.1.0 archive

Analysis

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

  • Dart: 2.0.0-dev.49.0
  • pana: 0.10.6

Scores

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

Platforms

Detected platforms: Flutter, other

Primary library: package:simple_server/simple_server.dart with components: io.

Suggestions

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

    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 simple_server.dart.

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 1 hint.

    Run dartfmt to format lib/simple_server.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >1.12.0
dart_config >=0.5.0 <0.6.0 0.5.0
route_provider >=0.3.4 <0.4.0 0.3.6 1.0.1
Transitive dependencies
charcode 1.1.1
collection 1.14.9
mime_type 0.1.8 0.2.1
path 1.5.1
source_span 1.4.0
stack_trace 1.9.2
string_scanner 1.0.2
unittest 0.11.7 0.12.4+1
yaml 2.1.13