Tutorial for creating a Owin module using Nancy as rendering engine.
This is a very simple startup project that explain how to embed a web application into an assembly (yes, just a simple dll) and provide it as part of a web site.
Project is composed by a web site and a library project. Web site is just a simple MVC web site use as container. It should represent the base site where you'll need to integrate an embedded site. Inside the library project there is some nancy configuration and a view used to rendere embedded web site.
In this project you can see in action:
Today there are a missing class inside Nancy package released on nuget. This class is "EmbeddedStaticContentConventionBuilder" and is needed to serve static content from assembly, foundamental to keep resources as js,css, images inside external assembly.
Another problem is about "ResourceViewLocationProvider" that when find two view with same name it throw an exception. I implement my provider that overwite views allowing fallback logic on view engine.