larenelg / csse6400-weather-api

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CSSE6400 Weather API

  1. Download and install the .NET 6.0 SDK

  2. Download and install Docker

  3. Run Seq on Docker (run this in any terminal)

docker run --name seq -d --restart unless-stopped -e ACCEPT_EULA=Y -p 5341:80 datalust/seq:latest

  1. Install the dependencies (in terminal, in the root folder of this project)

dotnet restore

  1. Run the API (in terminal, in the root folder of this project)

dotnet run

  1. Check that it's working in Postman (in Postman, go Import > Raw Text > Paste the curl below)

curl --location --request GET 'http://localhost:5248/weatherforecast'

  1. Add the POST endpoint as well (in Postman, go Import > Raw Text > Paste the curl below)
curl --location --request POST 'http://localhost:5248/weatherforecast' \
--header 'Content-Type: application/json' \
--data-raw '"Spicy"'

About


Languages

Language:C# 100.0%