Interfaces

Project

Dart

NuGet packageOwin.Framework.Dart
GitHub sourceOwinFramework.Dart

Home |  Readme

The OwinFramework.Dart Project

This middleware will serve a UI written in Dart. Dart is a Google language that compiles to Javascript for older browsers that can not run Dart code natively. This middleware detects browsers that support Dart natively and serves Dart code to them and compiled Javascript otherwise.

Adding this middleware to the Owin pipeline

builder.Register(ninject.Get<OwinFramework.Dart.DartMiddleware>())
    .As("Dart")
    .ConfigureWith(config, "/owinFramework/middleware/dart");    
The assumes that you are using Ninject as your IoC container, and followed the getting started walkthrough. If this is not the case then you will need to adjust the code to work in your application.

Default Configuration

The configuration below is the configuration you will get by default if you do not provide a configuration for this middleware.

{
   "owinFramework": {
      "middleware": {
         "dart": {
            "documentationRootUrl": "/config/dart",
            "uiRootUrl": "/ui",
            "dartUiRootUrl": "/ui/web",
            "compiledUiRootUrl": "/ui/build/web",
            "defaultDocument": "index.html",
            "analyticsEnabled": true
         }
      }
   }
}
Note that when you compile your Dart application with the pub tool it will copy the compiled version of your Dart code to \ui\build\web so everything will work right out of the box.