-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
111 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="Run" type="LaunchSettings" factoryName=".NET Launch Settings Profile"> | ||
<option name="LAUNCH_PROFILE_PROJECT_FILE_PATH" value="$PROJECT_DIR$/Tazor.Sample/Tazor.Sample.csproj" /> | ||
<option name="LAUNCH_PROFILE_TFM" value="net8.0" /> | ||
<option name="LAUNCH_PROFILE_NAME" value="Run" /> | ||
<option name="USE_EXTERNAL_CONSOLE" value="0" /> | ||
<option name="USE_MONO" value="0" /> | ||
<option name="RUNTIME_ARGUMENTS" value="" /> | ||
<option name="GENERATE_APPLICATIONHOST_CONFIG" value="1" /> | ||
<option name="SHOW_IIS_EXPRESS_OUTPUT" value="0" /> | ||
<option name="SEND_DEBUG_REQUEST" value="1" /> | ||
<option name="ADDITIONAL_IIS_EXPRESS_ARGUMENTS" value="" /> | ||
<method v="2"> | ||
<option name="Build" /> | ||
</method> | ||
</configuration> | ||
</component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
@page "/" | ||
@layout _Layout | ||
|
||
<h1>Welcome to Tazor</h1> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
@layout _Layout | ||
|
||
@using Tazor.Sample.Components | ||
@layout Shared._Layout |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,15 @@ | ||
using Tazor; | ||
using Tazor.Sample2; | ||
|
||
var builder = new RunnerBuilder(args); | ||
var runner = builder.Build(); | ||
var builder = WebApplication.CreateBuilder(args); | ||
builder.Services.AddHostedService<TazorHostedService>(); | ||
|
||
await runner.Run(); | ||
var app = builder.Build(); | ||
|
||
app.UseDefaultFiles(); | ||
app.UseStaticFiles(new StaticFileOptions | ||
{ | ||
ServeUnknownFileTypes = true, | ||
DefaultContentType = "text/plain" | ||
}); | ||
|
||
app.Run(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"$schema": "http://json.schemastore.org/launchsettings.json", | ||
"profiles": { | ||
"Run": { | ||
"commandName": "Project", | ||
"dotnetRunMessages": true, | ||
"launchBrowser": true, | ||
"applicationUrl": "https://localhost:7250;http://localhost:5153", | ||
"environmentVariables": { | ||
"ASPNETCORE_ENVIRONMENT": "Development" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
namespace Tazor.Sample2; | ||
|
||
public class TazorHostedService : IHostedService | ||
{ | ||
private readonly IHostEnvironment _environment; | ||
|
||
public TazorHostedService(IHostEnvironment environment) | ||
{ | ||
_environment = environment; | ||
} | ||
|
||
public async Task StartAsync(CancellationToken cancellationToken) | ||
{ | ||
var wwwroot = Path.Combine(_environment.ContentRootPath, "wwwroot"); | ||
var builder = new RunnerBuilder(new RunnerOptions | ||
{ | ||
OutputPath = wwwroot | ||
}); | ||
|
||
var runner = builder.Build(); | ||
|
||
await runner.Run(); | ||
} | ||
|
||
public Task StopAsync(CancellationToken cancellationToken) | ||
{ | ||
return Task.CompletedTask; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
@using Tazor.Sample.Components | ||
|
||
@inject IRunnerOptions Options | ||
@using Tazor.Sample2.Components |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"Logging": { | ||
"LogLevel": { | ||
"Default": "Information", | ||
"Microsoft.AspNetCore": "Warning" | ||
} | ||
}, | ||
"AllowedHosts": "*" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters