segunda-feira, 21 de maio de 2018

Learning .Net Core - Using mac to build an Single Page Application in .Net Core

I am not going to explain each stuff because I don't know and I am learning as well, here are the commands that take me to start one .Net Core Vue application and publish it on smartasp.net.

For more details on what are you doing read the sources.

1. Install .Net
1.1. Go to https://www.microsoft.com/net/download/macos
1.2. Download .Net Core and Visual Studio.
I installed Visual Studio and .Net Core SDK to try. But I guess if we use only VS code we don't need to install Visual Studio.
1.3. Check if .Net core is installed, open the terminal and type:
dotnet --version

You should see the version dotnet version on my case it shows 2.1.4

2. Creating a new project using SPA(Single Page Application) templates.
Source: "Building Single Page Applications on ASP.NET Core with JavaScriptServices"

2.1. Let's create a vue project, in your terminal, go to the folder that you would like to create your projects. In my case I was on Documents/Project, then I typed:

mkdir new-project
cd new-project
dotnet new vue
npm install


3. Running the app, in your terminal type:

dotnet run

Source: Microsoft - dotnet run

After you see the "Request finished in xxxx 404" you can open localhost.


http://localhost:5000

You should see the template example right now.

Nenhum comentário:

Postar um comentário