Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
20 lines (19 sloc) 518 Bytes
using Nancy;
using StringConvert.WebClient.Common;
using StringConvert.WebClient.Converting;
namespace StringConvert.WebClient
{
public class MainModule : NancyModule
{
public MainModule(IConverterRepository converterRepository)
{
Get["/"] = x => {
var viewModel = new
{
converters = converterRepository.GetAll()
};
return View["index.cshtml", viewModel.AsJson()];
};
}
}
}