Redstone.dart

A server-side microframework for the Dart platform

Simple and intuitive
Redstone.dart allows you to easily publish your functions and classes through a web interface, by just adding some annotations to them.
import 'package:redstone/redstone.dart' as app;

@app.Route("/")
helloWorld() => "Hello, World!";

main() {
  app.setupConsoleLog();
  app.start();
}
Powerful
Includes support for request interceptors, error handlers, dependency injection and many other features.
@app.Interceptor(r'/admin/.*')
adminFilter() {
  if (app.request.session["username"] != null) {
    return app.chain.next();
  } else {
    return app.chain.abort(HttpStatus.UNAUTHORIZED);
    //or app.redirect("/login.html");
  }
}
@app.ErrorHandler(404)
handleNotFoundError() => app.redirect("/error/not_found.html");
Easily testable
Easily test your server, without the need of an external tool.
main() {
  setUp(app.redstoneSetUp);
  tearDown(app.redstoneTearDown);

  test("service", () {
    var req = new MockRequest("/service");
    return app.dispatch(req).then((resp) {
      expect(resp.statusCode, equals(200));
      expect(resp.mockContent, equals("ok"));
    });
  })
}
buy clomid online buying clomid clomid buy online
cialis canadian pharmacy online pharmacy cialis canada pharmacy
viagra for sale discount viagra viagra generic