I'm trying to serve static assets in the folder assets
via Nancy. Here's the code that I am using in the Bootstrapper:
protected override void ConfigureConventions(NancyConventions nancyConventions)
{
var assets = EmbeddedStaticContentConventionBuilder.AddDirectory(
"/assets", GetType().Assembly);
nancyConventions.StaticContentsConventions.Add(assets);
base.ConfigureConventions(nancyConventions);
}
I have marked the file (project root)/assets/test.css
as an embedded resource. Yet when I start up the server and visit localhost:5000/assets/test.css
I get a 404 error.
It should be noted that I'm running dotnet core 2.0-preview2-final on OS X Sierra.