();
+
+ [Function("Function1")]
+ public HttpResponseData Run([HttpTrigger(AuthorizationLevel.Function, "get", "post")] HttpRequestData req)
+ {
+ _logger.LogInformation("C# HTTP trigger function processed a request.");
+
+ var response = req.CreateResponse(HttpStatusCode.OK);
+ response.Headers.Add("Content-Type", "text/plain; charset=utf-8");
+
+ response.WriteString("Welcome to Azure Functions!");
+
+ return response;
+ }
+ }
+}
diff --git a/BeauFindlay/src/BeauFindlay.Api/Program.cs b/BeauFindlay/src/BeauFindlay.Api/Program.cs
new file mode 100644
index 0000000..9de3b3e
--- /dev/null
+++ b/BeauFindlay/src/BeauFindlay.Api/Program.cs
@@ -0,0 +1,14 @@
+using Microsoft.Azure.Functions.Worker;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Hosting;
+
+var host = new HostBuilder()
+ .ConfigureFunctionsWorkerDefaults()
+ .ConfigureServices(services =>
+ {
+ services.AddApplicationInsightsTelemetryWorkerService();
+ services.ConfigureFunctionsApplicationInsights();
+ })
+ .Build();
+
+host.Run();
diff --git a/BeauFindlay/src/BeauFindlay.Api/Properties/launchSettings.json b/BeauFindlay/src/BeauFindlay.Api/Properties/launchSettings.json
new file mode 100644
index 0000000..e296acb
--- /dev/null
+++ b/BeauFindlay/src/BeauFindlay.Api/Properties/launchSettings.json
@@ -0,0 +1,9 @@
+{
+ "profiles": {
+ "BeauFindlay.Api": {
+ "commandName": "Project",
+ "commandLineArgs": "--port 7197",
+ "launchBrowser": false
+ }
+ }
+}
\ No newline at end of file
diff --git a/BeauFindlay/src/BeauFindlay.Api/Properties/serviceDependencies.json b/BeauFindlay/src/BeauFindlay.Api/Properties/serviceDependencies.json
new file mode 100644
index 0000000..df4dcc9
--- /dev/null
+++ b/BeauFindlay/src/BeauFindlay.Api/Properties/serviceDependencies.json
@@ -0,0 +1,11 @@
+{
+ "dependencies": {
+ "appInsights1": {
+ "type": "appInsights"
+ },
+ "storage1": {
+ "type": "storage",
+ "connectionId": "AzureWebJobsStorage"
+ }
+ }
+}
\ No newline at end of file
diff --git a/BeauFindlay/src/BeauFindlay.Api/Properties/serviceDependencies.local.json b/BeauFindlay/src/BeauFindlay.Api/Properties/serviceDependencies.local.json
new file mode 100644
index 0000000..b804a28
--- /dev/null
+++ b/BeauFindlay/src/BeauFindlay.Api/Properties/serviceDependencies.local.json
@@ -0,0 +1,11 @@
+{
+ "dependencies": {
+ "appInsights1": {
+ "type": "appInsights.sdk"
+ },
+ "storage1": {
+ "type": "storage.emulator",
+ "connectionId": "AzureWebJobsStorage"
+ }
+ }
+}
\ No newline at end of file
diff --git a/BeauFindlay/src/BeauFindlay.Api/host.json b/BeauFindlay/src/BeauFindlay.Api/host.json
new file mode 100644
index 0000000..ee5cf5f
--- /dev/null
+++ b/BeauFindlay/src/BeauFindlay.Api/host.json
@@ -0,0 +1,12 @@
+{
+ "version": "2.0",
+ "logging": {
+ "applicationInsights": {
+ "samplingSettings": {
+ "isEnabled": true,
+ "excludedTypes": "Request"
+ },
+ "enableLiveMetricsFilters": true
+ }
+ }
+}
\ No newline at end of file
diff --git a/BeauFindlay/src/BeauFindlay.Client/Pages/Contact.razor b/BeauFindlay/src/BeauFindlay.Client/Pages/Contact.razor
new file mode 100644
index 0000000..0705478
--- /dev/null
+++ b/BeauFindlay/src/BeauFindlay.Client/Pages/Contact.razor
@@ -0,0 +1,23 @@
+@page "/contact"
+
+@inject HttpClient HttpClient
+
+@if (!string.IsNullOrWhiteSpace(apiResponse))
+{
+ Response from Azure Function API: @apiResponse
+}
+
+@code {
+ private string apiResponse = "";
+
+ protected override async Task OnInitializedAsync()
+ {
+ var response = await HttpClient.GetStringAsync("/api/Function1");
+
+ if (!string.IsNullOrWhiteSpace(response))
+ {
+ apiResponse = response;
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/BeauFindlay/src/BeauFindlay.Client/Program.cs b/BeauFindlay/src/BeauFindlay.Client/Program.cs
index 0cc5805..6f15f4e 100644
--- a/BeauFindlay/src/BeauFindlay.Client/Program.cs
+++ b/BeauFindlay/src/BeauFindlay.Client/Program.cs
@@ -7,8 +7,11 @@ var builder = WebAssemblyHostBuilder.CreateDefault(args);
builder.RootComponents.Add("#app");
builder.RootComponents.Add("head::after");
-builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
+var apiBase = builder.Configuration["ApiBase"]
+ ?? throw new ArgumentException("API base address not found in config.");
+
+builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(apiBase) });
builder.Services.AddSingleton();
-await builder.Build().RunAsync();
+await builder.Build().RunAsync();
\ No newline at end of file
diff --git a/BeauFindlay/src/BeauFindlay.Client/staticwebapp.config.json b/BeauFindlay/src/BeauFindlay.Client/staticwebapp.config.json
new file mode 100644
index 0000000..1d186ee
--- /dev/null
+++ b/BeauFindlay/src/BeauFindlay.Client/staticwebapp.config.json
@@ -0,0 +1,5 @@
+{
+ "navigationFallback": {
+ "rewrite": "/index.html"
+ }
+}
\ No newline at end of file
diff --git a/BeauFindlay/src/BeauFindlay.Client/wwwroot/appsettings.json b/BeauFindlay/src/BeauFindlay.Client/wwwroot/appsettings.json
new file mode 100644
index 0000000..25e6abd
--- /dev/null
+++ b/BeauFindlay/src/BeauFindlay.Client/wwwroot/appsettings.json
@@ -0,0 +1,10 @@
+{
+ "Logging": {
+ "LogLevel": {
+ "Default": "Information",
+ "Microsoft.AspNetCore": "Warning"
+ }
+ },
+ "AllowedHosts": "*",
+ "ApiBase": "http://localhost:7071"
+}
\ No newline at end of file