calling JS file in .net core api

SriRaghavendran Prabhakaran 405 Reputation points
2023-11-06T11:45:22.55+00:00

Hello,

I have a requirement to call a npm package in ASP .net core web api. Please suggest, how can i proceed it with.

this need to be containerized (.net core+npm package)

Developer technologies ASP.NET ASP.NET Core
Azure Container Apps
Azure Container Apps
An Azure service that provides a general-purpose, serverless container platform.
686 questions
{count} votes

Accepted answer
  1. MikeUrnun 9,777 Reputation points Moderator
    2023-11-06T20:41:52.2366667+00:00

    Hello @SriRaghavendran Prabhakaran - Just adding to Bruce's answer here: consider using Dapr Integration with your Azure Container Apps: Dapr integration with Azure Container Apps

    1 person found this answer helpful.
    0 comments No comments

Accepted answer
  1. Bruce (SqlWork.com) 77,686 Reputation points Volunteer Moderator
    2023-11-06T16:24:49.92+00:00

    You will need to run two processes in your container

    https://docs.docker.com/config/containers/multi-service_container/

    the first is a node express application that implements a webapi to the node package you want to use. The port need not be exposed outside the container.

    https://expressjs.com/en/starter/hello-world.html

    the second process is asp.net core app. This app will HttpClient to call the node express app. It port(s) will need to be exposed.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.