百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
A

aspire-samples

> 后端框架
开源

浏览展示 Aspire 集成的示例应用,涵盖 C#、JavaScript、TypeScript、Python、Go、容器、数据库、云、AI 和可观察性等领域。

1.2K stars0 点赞0 次浏览
访问官网GitHub

工具介绍

浏览展示 Aspire 集成的示例应用,涵盖 C#、JavaScript、TypeScript、Python、Go、容器、数据库、云、AI 和可观察性等领域。

Aspire Samples

Samples for Aspire.

Aspire is a developer-first toolset that streamlines integrating front-ends, APIs, containers, and databases with your apps. Learn more about Aspire here.

Browse by scenario

  • Full-stack JavaScript / TypeScript
  • Polyglot full-stack
  • Backend integrations by language
  • Cloud / AI / event-driven
  • .NET + frontend and platform

Full-stack JavaScript / TypeScript

Sample Workload languages AppHost Deploy Description
Integrating Frontend Apps JavaScript, TypeScript C# AppHost Run only React, Vue, and Angular frontends integrated with Aspire.
Node + Redis + Vite JavaScript, TypeScript TypeScript AppHost Docker Compose Express API + React/Vite frontend + Redis behind YARP.
Node.js Weather Explorer JavaScript, TypeScript TypeScript AppHost Run only Interactive Leaflet weather map; Express + OpenTelemetry API over the Open-Meteo external service.
Vite + YARP Static Files JavaScript, TypeScript TypeScript AppHost Docker Compose Vite frontend served through YARP in run and publish modes.

Polyglot full-stack

Sample Workload languages AppHost Deploy Description
Integrating Python Apps Python, JavaScript C# AppHost Run only FastAPI backend + React frontend integrated with Aspire.
Vite + C# + PostgreSQL C#, JavaScript, TypeScript TypeScript AppHost Docker Compose React frontend + C# API + PostgreSQL in a single Aspire app.
Vite + React + FastAPI Python, JavaScript, TypeScript TypeScript AppHost Docker Compose React frontend + FastAPI backend behind YARP.
Polyglot Task Queue JavaScript, Python, C# TypeScript AppHost Docker Compose React + Node API + Python/C# workers coordinated through RabbitMQ.
RAG Document Q&A Python, JavaScript TypeScript AppHost Run only Svelte frontend + FastAPI + Qdrant + OpenAI.

Backend integrations by language

Sample Workload languages AppHost Deploy Description
Integrating a Go App Go C# AppHost Docker Compose Builds and runs a Go Gin app from a Dockerfile with Aspire.
Custom MailDev and MailKit integrations C#, TypeScript TypeScript AppHost Run only Authors custom hosting and client integrations with ATS-generated TypeScript APIs.
Go API Go TypeScript AppHost Docker Compose Go + chi API with Aspire-managed run and publish flows.
Python FastAPI + PostgreSQL Python TypeScript AppHost Docker Compose FastAPI CRUD API wired to PostgreSQL and pgAdmin.
Python OpenAI Agent Python TypeScript AppHost Docker Compose FastAPI AI agent sample with OpenAI integration.
Python Script Python TypeScript AppHost Run only Minimal Python script sample using a file-based AppHost.

Cloud / AI / event-driven

Sample Workload languages AppHost Deploy Description
Azure Functions C# C# AppHost Azure Integrates Azure Functions, ASP.NET Core, and Blazor with Aspire.
Image Gallery C#, JavaScript, TypeScript C# AppHost Azure Upload and process images with Azure Blob, Queues, SQL, and Container Apps Jobs.
Custom Metrics Visualization C# C# AppHost Run only Collects and visualizes custom metrics with Prometheus and Grafana.
Standalone Aspire dashboard C# C# AppHost Run only Runs the Aspire dashboard container against any OpenTelemetry source.

.NET + frontend and platform

Sample Workload languages AppHost Deploy Description
Aspire Shop C# C# AppHost Run only Distributed e-commerce sample app demonstrating Aspire integration.
HealthChecksUI C# C# AppHost Docker Compose Demonstrates isolated health endpoints with HealthChecksUI.
Integrating Client Apps C# C# AppHost Run only Integrates Windows Forms and WPF apps with Aspire.
Integrating Orleans C# C# AppHost Run only Distributed actor model sample built with Orleans.
Working with Database Containers C#, SQL C# AppHost Run only Initializes and uses PostgreSQL, MongoDB, and SQL Server containers.
Running EF Core Migrations C# C# AppHost Run only Runs Entity Framework Core migrations inside Aspire workflows.
Persisting Data with Volume Mounts C# C# AppHost Run only Demonstrates data persistence with containers, Azure Storage, and SQL Server.
Custom Aspire hosting resources C# C# AppHost Run only Demonstrates authoring custom hosting resources with Aspire.

eShop

eShop is a reference application implementing an eCommerce web site on a services-based architecture using Aspire.

Aspire Links

  • Aspire Documentation
  • Aspire Blog
  • Aspire GitHub

License

These samples are licensed under the MIT license.

Disclaimer

The sample applications provided in this repository are intended to illustrate individual concepts that may be beneficial in understanding the underlying technology and its potential uses. These samples may not illustrate best practices for production environments.

The code is not intended for operational deployment. Users should exercise caution and not rely on the samples as a foundation for any commercial or production use.

See the following links for more information on best practices and security considerations when hosting applications:

  • ASP.NET Core security topics
  • Node.js security best practices
  • FastAPI security

Contributing

We welcome contributions to this repository of samples related to official Aspire features and integrations (i.e. those pieces whose code lives in the Aspire repo and that ship from the Aspire NuGet account). It's generally a good idea to log an issue first to discuss any idea for a sample with the team before sending a pull request.

Code of conduct

This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behavior in our community. For more information, see the .NET Foundation Code of Conduct.

Using Devcontainer and Codespaces

This repository includes a devcontainer configuration to help you quickly set up a development environment using Visual Studio Code and GitHub Codespaces.

Setting up Devcontainer

  1. Install Visual Studio Code: If you haven't already, download and install Visual Studio Code.

  2. Install Dev Containers extension: Open Visual Studio Code and go to the Extensions view by clicking on the Extensions icon in the Activity Bar on the side of the window. Search for "Dev Containers" and install the extension.

  3. Clone the repository: Clone this repository to your local machine.

  4. Open the repository in Visual Studio Code: Open Visual Studio Code and use the File > Open Folder menu to open the folder where you cloned this repository.

  5. Reopen in Container: Once the repository is open, you should see a notification prompting you to reopen the folder in a container. Click the "Reopen in Container" button. If you don't see the notification, you can also use the Remote-Containers: Reopen in Container command from the Command Palette (Ctrl+Shift+P).

Using GitHub Codespaces

  1. Open the repository on GitHub: Navigate to this repository on GitHub.

  2. Create a Codespace: Click the "Code" button and then click the "Open with Codespaces" tab. Click the "New codespace" button to create a new Codespace.

  3. Wait for the Codespace to start: GitHub will set up a new Codespace with the devcontainer configuration defined in this repository. This may take a few minutes.

  4. Start coding: Once the Codespace is ready, you can start coding directly in your browser or open the Codespace in Visual Studio Code.

The devcontainer configuration includes all the necessary tools and dependencies to run the samples in this repository. You can start coding and running the samples without having to install anything else on your local machine.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

C#apphostaspireazurecloud-native

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类后端框架
定价开源

> 相关工具

N
Node.js
基于 V8 的 JavaScript 运行时
D
Django
Python 高级 Web 框架
S
Spring Boot
Java 生态主流微服务框架