A recorded live stream. We have an ASP.NET Core application that contains a React SPA. The ASP.NET Core and React SPA communicate with each other through the use of SignalR.
Now it’s time to publish the app.
We specify the publishing commands in the csproj file for our ASP.NET Core application.
Next, we create an .env file. Using the “env-cmd” node module, we set a configuration file to run when we build our React application for IIS.
Afterwards, we set up a yarn command in package.json so it can run a series of scripts for when we build in IIS.
Other steps include ensuring we have ASP.NET Core Runtime and the Hosting Bundle set up, and setting up an IIS website.
Finally, we test out the application from IIS to check that our React app functions properly.
► More Information: https://www.roundthecode.com/dotnet/asp-net-core-web-hosting/how-to-publish-an-asp-net-core-react-spa-to-iis
#react #iis #aspnetcore