Skip to main content
net8.0net9.0

A .NET Aspire for hosting NodeJS apps using Vite, Yarn, PNPM, or NPM.

Published
Jan 17, 2025
1y ago
Total Downloads
962.0K
961,996

Install

dotnet add package CommunityToolkit.Aspire.Hosting.NodeJS.Extensions --version 9.1.1-beta.137
ProductVersions
.NET
net8.0net9.0

README

CommunityToolkit.Aspire.Hosting.NodeJS.Extensions library

This integration contains extensions for the Node.js hosting package for .NET Aspire, including support for alternative package managers (yarn and pnpm), as well as developer workflow improvements.

Getting Started

Install the package

In your AppHost project, install the package using the following command:

dotnet add package CommunityToolkit.Aspire.Hosting.NodeJS.Extensions

Example usage

Then, in the Program.cs file of AppHost, define a Node.js resource, then call AddYarnApp or AddPnpmApp:

builder.AddYarnApp("yarn-demo")
    .WithExternalHttpEndpoints();

builder.AddPnpmApp("pnpm-demo")
    .WithExternalHttpEndpoints();

Additional Information

https://learn.microsoft.com/dotnet/aspire/community-toolkit/hosting-nodejs-extensions

Feedback & contributing

https://github.com/CommunityToolkit/Aspire

Changes from Previous Version

No structural changes between v9.1.1-beta.136 and v9.1.1-beta.137.

Adoption Assessment

A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.

This version is marked prerelease. Validate its API and upgrade path before production use.Compatibility metadata lists 2 target frameworks; confirm the exact target used by your application.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.