04 Nov 2019
Getting Started
- Part 1 - Introduction
- Part 2 - This Article
- Part 3 - Creating a basic design
- Part 4 - Upgrade to .NET Core 3.1
- Part 5 - Database test
- Part 6 - Create the database
- Part 7 - No architecture deep dive
- Part 8 - First API mockup
- Part 9 - A new start
- Part 10 - Create the database scripts
- Part 11 - Create the group controller and service
- Part 12 - Running SQL Server in Docker
- Part 13 - Being able to use two database engines
Today I made the first steps to create the new Football Prediction Game in ASP.NET Core and Angular.
I decided that I wanted to start the project on my Linux laptop, running Ubuntu 19.04. Later I will definitly develop on my Windows 10 machine as well where I have Visual Studio 2019 Community Edition already installed.
To develop on Linux I had to install the .NET Core 3.0 SDK. I simply followed the described steps on the .NET website. That just worked.
For Angular development you need to have Node.js installed. I already have the LTS version of Node.js installed, but if you don’t have it just follow the steps described on their website.
In Visual Studio Code I installed the C# extension.
With everything in place I created the new project.
mkdir Football
cd Footbal
dotnet new angular
That results is project that combines ASP.NET and Angular. Luckily this template was already updated to Angular 8. No need to worry about that.
Now I want can run the project for the first time.
dotnet run
When I opened https://localhost:5001
I got an big warning about the self-signed certificate. For now I accept it. I need to investigate that later.
So far, so good. But these were the easy steps. I haven’t even really started.
Digging a bit into the created project I found that the line endings for all the files are all in CRLF
format, even though they were created on Linux.
And I know that I will use the Angular CLI, so I converted all the files in the ClientApp
directory of LF
.
This is done very easily on Linux with:
cd ClientApp
find . -exec dos2unix {} \;
Altough it is a very simple repository, I still pushed it to GitLab.
Now I need to think about the layout first. The layout of the old website is not usable. Being a developer and not a designer that will be the first challenge.