Skip to content

Multiple Static Folder #599

@WillCrystian

Description

@WillCrystian

I need to create a project with multiple static folders, is there this resource in the library?

 var server = new EmbedIO.WebServer(o => o
     .WithUrlPrefix(url)
     .WithMode(HttpListenerMode.EmbedIO))
     .WithLocalSessionManager()
     .WithWebApi("/api", m => m
			.WithController(() => new ApiController())
			.WithController(() => new AnalyticsController()))				
      .WithStaticFolder("/", HtmlRootPath, true,  m => m
	      .WithContentCaching(UseFileCache))
      .WithStaticFolder("/", HtmlRootPath + "\\analytics", true, m => m
	      .WithContentCaching(UseFileCache))
      .WithModule(new ActionModule("/", HttpVerbs.Any, ctx => ctx.SendDataAsync(new { Message = "Error" })));

I'm trying to implement this code but without success.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions