riganti / dotvvm

Open source MVVM framework for Web Apps
https://www.dotvvm.com
Apache License 2.0
749 stars 97 forks source link

Integrating dotvvm with NancyFx #345

Closed PavelBansky closed 7 years ago

PavelBansky commented 7 years ago

What is the right way to integrate dotvvm with NancyFx into web application.

Ideally I want to have dotvvm powered website with some REST API exposed via NancyFx

Thank you!

exyi commented 7 years ago

In principle, it should just work when you register both middlewares in the Startup class using app.UseNancy(); and app.UseDotvvm<...>();. But I haven't tried that, so feel free to reopen the issue, if you have any specific problems.

tomasherceg commented 7 years ago

I've created a simple demo app to show integration of Nancy and DotVVM in one app.

https://github.com/riganti/dotvvm-samples-combo-with-nancy

The sample is running OWIN and full .NET Framework. For .NET Core, it will be even easier - jst add DotVVM.AspNetCore package and register DotVVM services and middleware in Startup.cs.