Teaching twitch chat how to create a ASPNET Core WebAPI!
I am making the assumption you have:
- Visual Studio 2022, VS Code, or Rider.
- .NET 7 SDK installed
- Postman installed
- NodeJS/NPM and VS Code (whenever the frontend comes along)
- Docker (Desktop on Windows or just docker containerd on Linux)
- Git
Download this and run the installer: https://www.docker.com/products/docker-desktop/ (works on linux too, but I generally use CLI on Linux)
LINUX CLI - there is a new convinience script Docker provides, so maybe skip to that section if you dont want to run all these commands. For Ubuntu follow these directions https://docs.docker.com/engine/install/ubuntu/
For Fedora follow these directions https://docs.docker.com/engine/install/fedora/
Post linux install steps: https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user
- docker pull postgres
- docker pull redis
- docker run -p 6379:6379 --restart unless-stopped --name dev-redis -d redis
- docker run -p 5432:5432 --restart unless-stopped --name dev-postgres -v dev-postgres -e POSTGRES_PASSWORD= -e POSTGRES_INITDB_ARGS="--auth-host=scram-sha-256 --auth-local=scram-sha-256" -d postgres
- dotnet tool install --global dotnet-ef
- dotnet tool install -g dotnet-aspnet-codegenerator
change your directory to Orchard.Web run following to add migration dotnet ef migrations add
run following to update database dotnet ef database update