simple_server 0.2.1

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 1

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

Use this package as a library

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

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: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
Popularity:
Describes how popular the package is relative to other packages. [more]
2
Health:
Code health derived from static analysis. [more]
--
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
--
Overall:
Weighted score of the above. [more]
1
Learn more about scoring.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Analysis issues and suggestions

Fix dependencies in pubspec.yaml.

Running pub upgrade failed with the following output:

ERR: The current Dart SDK version is 2.1.0.
 
 Because simple_server depends on dart_config >=0.3.0+1 which requires SDK version <2.0.0, version solving failed.

Health suggestions

Format lib/simple_server.dart.

Run dartfmt to format lib/simple_server.dart.

Maintenance issues and suggestions

Fix platform conflicts. (-20 points)

Error(s) prevent platform classification:

Fix dependencies in pubspec.yaml.

Running dartdoc failed. (-10 points)

Make sure dartdoc runs without any issues.

Package is too old. (-100 points)

The package was released more than two years ago.

Maintain an example. (-10 points)

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.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >1.12.0