Skip to content
Mark Watts edited this page Feb 13, 2014 · 8 revisions

Build

Build src/Slumber.sln using Visual Studio. The solution file is for Visual Studio 2012 so it may require some tweaking to work in earlier versions.

An Owin supported version of Slumber is available via src/Slumber.Owin.sln. This requires Visual Studio 2012/2013 and .Net 4.5.1. This solution contains additional NuGet dependencies and projects. The information on this page is for src/Slumber.sln.

Dependencies

The core Slumber project depends only on HandyFS, which is included in the lib folder.

The tests and example application have various NuGet dependencies. The solution file has NuGet package restore enabled so these will be downloaded when you first build.

NuGet packages:

  • log4net
  • xUnit.net
  • xUnit.net: Extensions
  • FsUnit.xUnit
Solution overview

The solution contains 5 projects:

  • app/
    • Slumber - main project.
    • Slumber.IO - serialisers.
  • tests/
    • Slumber.Tests - xUnit tests.
  • example/
    • Slumber.Example - example application, hosted by...
    • Slumber.Example.Web - C# web app using the default Slumber HTTP handler.

Register

Once you have built Slumber, add references to Slumber.dll and Slumber.IO.dll to your web application project.

The easiest way to get started with Slumber is to use the included HTTP handler. Simply add the handler to your web application by adding it to the web.config file.

<configuration>
    ...
    <system.webServer>
      <handlers>
        <add 
          name="Slumber" 
          path="api/*" 
          verb="*" 
          type="Slumber.SlumberHandler, Slumber"
          />
      </handlers>
    </system.webServer>
</configuration>

Configuration shown is for IIS 7.5 / IIS Express using integrated pipeline mode.

This will tell the web server to pass all requests to api/ and below to Slumber.

Next you need to tell Slumber about the services you want to expose.

Clone this wiki locally