route_provider 0.2.0

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • --

dart-routeprovider #

[![Join the chat at https://gitter.im/4stern/dart-routeprovider](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/4stern/dart-routeprovider?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) Build Status Stories in Ready

Installation #

Add it to your dependencies

dependencies:
  route_provider: any

and install the package

$ pub get

Usage #

import 'dart:io';
import 'package:route_provider/route_provider.dart';
main() {
    HttpServer.bind(InternetAddress.LOOPBACK_IP_V4,8080).then((HttpServer server){
        new RouteProvider(server, {
            "defaultRoute":"/",
            "staticContentRoot":"/docroot"
        })
        ..route({
            "url": "/",
            "controller": new RouteControllerEmpty(),
            "response": new FileResponse("docroot/index.html")
        })
        ..route({
            "url": "/impress",
            "controller": new RouteControllerEmpty(),
            "response": new FileResponse("docroot/impress.html")
        })
        ..start();
    }).catchError((e) => print(e.toString()));
}

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.0 (2015-08-??) #

  • rename RouteControllerEmpty to EmptyRouteController
  • add JsonResponser
  • add ApiRestController
  • change method signature of .route by using named parameters instead of map

0.1.13 #

  • Adding helfer functions to route-controller for parsing body-data like post-values

0.1.9 (2015-05-03) #

Feature:

  • add RouteError for transporting http-status-codes and messages to this layer; to handle error output not for your own

0.1.7 (2015-05-03) #

Feature:

  • add async/await handling

0.1.6 (2015-04-24) #

Feature:

  • RouteControllers execute-methode gets the request as parameter

Test:

  • add await expressions and async methods

0.1.5 (2015-04-23) #

Feature:

  • FileResponseHandler now sends file content as stream to response (@4stern)

0.1.4 (2015-04-23) #

Tests:

  • adding testfile to test the provider (@4stern)

Bugfixes:

  • fix content root bug (@4stern)

Use this package as a library

1. Depend on it

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


dependencies:
  route_provider: ^0.2.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:route_provider/route_provider.dart';
  
Version Uploaded Documentation Archive
3.1.6 Jan 13, 2019 Go to the documentation of route_provider 3.1.6 Download route_provider 3.1.6 archive
3.1.5 Jan 13, 2019 Go to the documentation of route_provider 3.1.5 Download route_provider 3.1.5 archive
3.1.4 Jan 13, 2019 Go to the documentation of route_provider 3.1.4 Download route_provider 3.1.4 archive
3.1.3 Jan 13, 2019 Go to the documentation of route_provider 3.1.3 Download route_provider 3.1.3 archive
3.1.2 Jan 13, 2019 Go to the documentation of route_provider 3.1.2 Download route_provider 3.1.2 archive
3.1.1 Jan 13, 2019 Go to the documentation of route_provider 3.1.1 Download route_provider 3.1.1 archive
3.1.0 Jan 12, 2019 Go to the documentation of route_provider 3.1.0 Download route_provider 3.1.0 archive
2.0.5 Jan 9, 2019 Go to the documentation of route_provider 2.0.5 Download route_provider 2.0.5 archive
2.0.4 Jan 5, 2019 Go to the documentation of route_provider 2.0.4 Download route_provider 2.0.4 archive
2.0.3 Jan 5, 2019 Go to the documentation of route_provider 2.0.3 Download route_provider 2.0.3 archive

All 37 versions...

Awaiting analysis to complete.