We plan to render content with a NextJS with server-side rendering, client-side routing, working, and where the client app and backend are hosted in the same application. The client app is hosted in its own Noje.js process and then proxied by .NET Core.
In startup.cs
, a proxy is added by calling services.AddNodeJs()
and by calling app.UseEndpoints(e => e.MapNodeJs());
a fallback endpoint is registered to the Node.js process. This means if an incoming request doesn’t match any other endpoint, for example, a controller, the request will be proxied to the Node.js process.
My startup.cs looks something like this
I can get this the app to run on my local machine, however the nodejs proxy throws a 500 on Azure app service linux container
My launch command to start the proxy node server seems incorrect , I’d greatly appreciate any guidance on configuring this NodeJS proxy