simple_server 0.2.1

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 33

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]
8
Health:
Code health derived from static analysis. [more]
98
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
0
Overall:
Weighted score of the above. [more]
33
Learn more about scoring.

We analyzed this package on Aug 10, 2018, and provided a score, details, and suggestions below. Analysis was completed with status tool failures using:

  • Dart: 2.0.0
  • pana: 0.11.8

Platforms

Detected platforms: unsure

Error(s) prevent platform classification:

Fix dependencies in pubspec.yaml.

Issues and suggestions

Fix dependencies in pubspec.yaml.

Running pub upgrade failed with the following output:

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

Fix platform conflicts.

Error(s) prevent platform classification:

Fix dependencies in pubspec.yaml.

Package is too old.

The package was released more than two years ago.

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 of the 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.

Format lib/simple_server.dart.

Run dartfmt to format lib/simple_server.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >1.12.0