Skip to content

Migrate Beta4 to rc1

Tom Kuijsten edited this page Sep 30, 2016 · 3 revisions

There are a couple of breaking changes in rc1.

Namespaces

The "Devkoes" prefix is removed from all namespaces.

API changes

The HttpServer.RegisterRoute is removed.
The HttpServer(int port) is obsolete and will be removed in the stable release.

New HttpServer sample

To support unified configuration we moved to a slightly different approach of creating a HttpServer. This sample was used until beta4:

var httpServer = new HttpServer(8800);
httpServer.RegisterRoute("api", restRouteHandler);
await httpServer.StartServerAsync();

And this will be replaced in rc1 with:

var configuration = new HttpServerConfiguration()
  .ListenOnPort(8800)
  .RegisterRoute("api", restRouteHandler)
  .EnableCors();

var httpServer = new HttpServer(configuration);
await httpServer.StartServerAsync();