languages | products | page_type | name | urlFragment | description | ||||
---|---|---|---|---|---|---|---|---|---|
|
|
sample |
.NET Aspire Node.js App sample |
aspire-nodejs |
An example of how to integrate a Node.js app into a .NET Aspire app. |
This sample demonstrates an approach for integrating a Node.js app into a .NET Aspire application.
The app consists of two services:
- NodeFrontend: This is a simple Express-based Node.js app that renders a table of weather forecasts retrieved from a backend API and utilizes a Redis cache.
- AspireWithNode.AspNetCoreApi: This is an HTTP API that returns randomly generated weather forecast data.
- .NET 8 SDK
- Docker Desktop
- Node.js - at least version 20.9.0
- Optional Visual Studio 2022 17.10
If using Visual Studio, open the solution file AspireWithNode.sln
and launch/debug the AspireWithNode.AppHost
project.
If using the .NET CLI, run dotnet run
from the AspireWithNode.AppHost
directory.