dotnet / docs-aspire

This repository contains .NET Aspire documentation.
https://learn.microsoft.com/dotnet/aspire
MIT License
77 stars 102 forks source link

Add adding existing node.js APIs to Javascript examples #1585

Closed indcoder closed 1 month ago

indcoder commented 2 months ago

Describe the issue or suggestion

In the JavaScript/Node articles, the examples are exclusively on frontend frameworks, but is missing on how to add existing/brownfield node.js APIs

  1. Other than frontend frameworks as JavaScript examples, we need to add examples on reusing their existing Node.js API as part of the Aspire Application model
  2. A primer on the instumentation.js that needs to be added to the JS projects so that they are Aspire compatible.
  3. Guidance on where the configuration values/secrets need to be stored: at the node.js level or part of the AppHost app settings?

Associated WorkItem - 308085

indcoder commented 2 months ago

Also,

  1. We need to be nuanced and provide more use cases when to use AddNPM and AddNode. Right now, its too terse.
image
  1. Also , it not mentioned anywhere in the doc that you need to add Aspire.Hosting.NodeJs, hence you dont get the two above function in the builder

Screenshot 2024-09-03 050514

Only when you peruse the github sample and inspect the AppHost and see in its dependency that you missing to add the nuget

image