-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Workshop2/issue36 #45
base: master
Are you sure you want to change the base?
Conversation
workshop2/01-setup.md
Outdated
`yourname/shelter-backend` (on some teams developers prefix their branch | ||
names with their usernames) or `shelter-backend`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
`yourname/shelter-backend` (on some teams developers prefix their branch | |
names with their usernames) or `shelter-backend`. | |
`shelter-backend` or `yourname/shelter-backend` (in some teams developers prefix their branch | |
names with their usernames). |
workshop2/01-setup.md
Outdated
Now we'll use [.NET Core CLI] to create the initial code for our | ||
application: | ||
|
||
1. Using your favourite shell, go to the cloned repo location, for example, if you repository was called `happy-rover`, run `cd c:\CodessInTheClassroom\happy-rover` and run the following command to generate a web api project `dotnet new webapi -n backend`. This will create a new C# project with some example code for a weather forecast api, that we will override to create our animal shelter API. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1. Using your favourite shell, go to the cloned repo location, for example, if you repository was called `happy-rover`, run `cd c:\CodessInTheClassroom\happy-rover` and run the following command to generate a web api project `dotnet new webapi -n backend`. This will create a new C# project with some example code for a weather forecast api, that we will override to create our animal shelter API. | |
1. Using your favourite shell, go to the cloned repo location (for example, if your repository was called `happy-rover`, run `cd c:\CodessInTheClassroom\happy-rover`) and run the following command to generate a web API project: `dotnet new webapi -n backend`. This will create a new C# project with some example code for a weather forecast api, that we will replace to create our animal shelter API. |
|
||
1. Using your favourite shell, go to the cloned repo location, for example, if you repository was called `happy-rover`, run `cd c:\CodessInTheClassroom\happy-rover` and run the following command to generate a web api project `dotnet new webapi -n backend`. This will create a new C# project with some example code for a weather forecast api, that we will override to create our animal shelter API. | ||
2. Run `code -r c:\CodessInTheClassroom\happy-rover\backend` to open the new created project in Visual Studio Code. | ||
If you're interested in what other options you can pass when creating a project using `.NET Core CLI` , you can [read more here](https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-new). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this line is related to the dotnet new
command, so I'd move it after point 1 (and maybe format it as a note)
something like this
workshop2/01-setup.md
Outdated
1. Using your favourite shell, go to the cloned repo location, for example, if you repository was called `happy-rover`, run `cd c:\CodessInTheClassroom\happy-rover` and run the following command to generate a web api project `dotnet new webapi -n backend`. This will create a new C# project with some example code for a weather forecast api, that we will override to create our animal shelter API. | ||
2. Run `code -r c:\CodessInTheClassroom\happy-rover\backend` to open the new created project in Visual Studio Code. | ||
If you're interested in what other options you can pass when creating a project using `.NET Core CLI` , you can [read more here](https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-new). | ||
3. Let's test now the generated web api, hit `Ctrl+F5` in Visual Studio Code, and it will compile and run the project. If there are no errors, in a browser go to the following URL: [https://localhost:5001/WeatherForecast](https://localhost:5001/WeatherForecast), and the server will return a json document with the weather forecat for the next week. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3. Let's test now the generated web api, hit `Ctrl+F5` in Visual Studio Code, and it will compile and run the project. If there are no errors, in a browser go to the following URL: [https://localhost:5001/WeatherForecast](https://localhost:5001/WeatherForecast), and the server will return a json document with the weather forecat for the next week. | |
3. Let's test now the generated web API: hit `Ctrl+F5` in Visual Studio Code, and it will compile and run the project. If there are no errors, open the following URL in a browser: [https://localhost:5001/WeatherForecast](https://localhost:5001/WeatherForecast), and the server will return a JSON document with the weather forecast for the next week. |
optionally mention you can do dotnet run
from command line as well
workshop2/01-setup.md
Outdated
We'll commit and push this code to our development branch to have a start point. To do that: | ||
1. [Read the guidance on staging changes and committing in the Git cheatsheet](../git-cheatsheet.md#commit). | ||
|
||
For example, you could open a new terminal using `Terminal → New Terminal` and run: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(at this point they have already opened a PoSh or cmd prompt, so this might be a bit confusing)
Added set up instructions for creating a webapi using dotnet cli