Skip to content

tokkenno/crossroad

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

crossroad

Simple router without dependencies for shelf

Usage

A simple usage example:

import 'package:crossroad/crossroad.dart';

main() {
    Crossroad.get('/:param1/:param2/:param3', (shelf.Request request, Map p) {
        return new shelf.Response.ok("Parameters: ${p.toString()}");
    });
    
    io.serve(Crossroad.handler, 'localhost', 8080).then((server) {
        print("Shelf listening on http://${server.address.host}:${server.port}");
    });
}

About

Lightweight router without dependencies for shelf

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages