Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rainxh11/qwikhosting
Host Qwik app using Deno and ASP.NET
https://github.com/rainxh11/qwikhosting
aspnet deno dotnet qwik reverseproxy webapi yarp
Last synced: about 2 months ago
JSON representation
Host Qwik app using Deno and ASP.NET
- Host: GitHub
- URL: https://github.com/rainxh11/qwikhosting
- Owner: rainxh11
- License: mit
- Created: 2024-01-30T13:30:20.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-01-30T13:32:12.000Z (12 months ago)
- Last Synced: 2024-07-29T16:58:05.949Z (6 months ago)
- Topics: aspnet, deno, dotnet, qwik, reverseproxy, webapi, yarp
- Language: C#
- Homepage:
- Size: 8.79 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Qwik + Deno + ASP\.NET CORE
run Deno hosted Qwik app alongside ASP\.NET application through [YARP](https://github.com/microsoft/reverse-proxy) reverse proxy.
| Version | Downloads |
| -------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ |
| [![Latest version](https://img.shields.io/nuget/v/QwikHosting.Deno.svg)](https://www.nuget.org/packages/QwikHosting.Deno/) | ![Downloads](https://img.shields.io/nuget/dt/QwikHosting.Deno.svg) |## Example Usage:
```csharp
using QwikHosting.Deno;var builder = WebApplication.CreateBuilder(args);
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();builder.Services.AddReverseProxy(); // Register YARP
builder.Services.AddQwikHosting(config =>
{
// qwik application path
config.BaseDirectory = AppContext.BaseDirectory + "qwik-app";// port to run deno at, passed as 'PORT' environment variable
config.Port = 9800;// if no 'deno' binary was found in path, will auto-download the latest version from github
config.BinaryPick = DenoBinaryTypePriority.TryPathThenDownloaded;
});var app = builder.Build();
if (app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI();
}app.UseHttpsRedirection();
app.MapGet("/api/weather", () => "weather")
.WithName("GetWeatherForecast")
.WithOpenApi();app.UseQwikDenoReverseProxy(); // map qwik deno endpoints to yarp
app.Run();
```