diff --git a/web-application/app/Program.cs b/web-application/app/Program.cs index 1024911..48daf4f 100644 --- a/web-application/app/Program.cs +++ b/web-application/app/Program.cs @@ -2,6 +2,7 @@ using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Rewrite; using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.FileProviders; using Peachpie.AspNetCore.Web; using System; using System.Collections.Generic; @@ -55,7 +56,10 @@ public void Configure(IApplicationBuilder app) // app.UseDefaultFiles(); - app.UseStaticFiles(); + + // use static files embedded in the compiled assembly + var fileProvider = new ManifestEmbeddedFileProvider(typeof(ResourceDemo).Assembly); + app.UseStaticFiles(new StaticFileOptions() { FileProvider = fileProvider }); } } } diff --git a/web-application/website/img/peachpie.png b/web-application/website/img/peachpie.png new file mode 100644 index 0000000..b206722 Binary files /dev/null and b/web-application/website/img/peachpie.png differ diff --git a/web-application/website/resourcedemo.php b/web-application/website/resourcedemo.php new file mode 100644 index 0000000..3f6b6d3 --- /dev/null +++ b/web-application/website/resourcedemo.php @@ -0,0 +1,19 @@ + + + + + +"; + } +} + +(new ResourceDemo)->show(); + +?> + + diff --git a/web-application/website/style.css b/web-application/website/style.css new file mode 100644 index 0000000..5c0470a --- /dev/null +++ b/web-application/website/style.css @@ -0,0 +1,3 @@ +body { + background-color: #f4511e; +} diff --git a/web-application/website/website.msbuildproj b/web-application/website/website.msbuildproj index 1f8733c..b408024 100644 --- a/web-application/website/website.msbuildproj +++ b/web-application/website/website.msbuildproj @@ -2,8 +2,11 @@ Library netstandard2.0 + true + + \ No newline at end of file