Blog 1

Install Nuxt.js and .NET CORE on Azure VM.

In this article, the author has experimented with Deploy Nuxt.JS and .Net Core 3.1 on a VM by choosing the service of Azure Cloud by preparing the source code on the Nuxt.JS side which is Project TypeScript, consisting of basic lib such as Vuetify, axios, fibers. And prepared the source code for .NET Core 3.1 with a sample controller and already installed Swagger and Nuxt Helper in the SPA.

1. Install Azure VM

       1.1 Create a virtual machine on Azure by choosing the size as we want. The OS we will use in this article is Windows Server 2016.

2 Core, Ram 4 When completed, we will get a public IP, such as 1x.xxx.xxx.255. Don't forget to use it in map binding IIS next.

Please allow Port OutBound for APIs. This article uses port 5000.

       1.2 Set up to be able to RDP (Remote Desktop Protocol) so that we can remote install various programs on the Server.

 

2. Install IIS

       2.1 Create a Site for installing api and web in IIS by setting different ports as follows.

For Your.web: Localhost:80 (use public IP 1x.xxx.xxx.255:80)
           For Your.api: Localhost:5000 (use public IP 1x.xxx.xxx.255:5000)

       2.2 Create an Application Pool by following the steps as follows:
            Application Pools > my website > Advanced Settings > .NET CLR Version, and select No Managed Code.

 

3. Install .NET CORE 3.1

Download the .NET CORE 3.1 installer at https://dotnet.microsoft.com/download/dotnet-core/3.1.

Press Install until finished. Then copy the source code that we have prepared and put it in Folder: Your.api and link the path with IIS.

Then restart it a few times and try testing it in your browser.

 

4. Install NODE.JS

Go to download the NODE.JS installer at https://nodejs.org/en/download/ and choose to use 32 bit for WINDOWS.

 

5. Install Nuxt.JS

Build our website into Dist first using the command

“npm run build” or “npm run generate”

 

6. Create web config in folder DIST.

 

7. Run the NUXT.JS test.

Set Port: 80 to Your.web and try running it on your browser.

 

This article provides basic instructions for installing Nuxt.JS and .NET Core on an Azure VM. It can be applied to other VMs.

Ref: https://samwalpole.com/how-to-run-nuxt-from-a-aspnet-core-web-application