Minimal-URL-Shortener
An example web app based on the new feature in .NET 8 | minimal web API in ASP.NET 8
File Explorer
Download Latest Version (.zip)- FUNDING.yml
- launchSettings.json
- appsettings.Development.json
- appsettings.json
- index.html
- Program.cs
- UrlShortener.csproj
- UrlShortener.sln
- UrlShortener.sln.DotSettings
- .gitignore
- Dockerfile
- LICENSE.md
- minimal-apis.png
- postman.png
- README.md
- url-shortener.gif
# Installation Guide
1. Get the code
git clone https://github.com/dotnet-labs/Minimal-URL-Shortener
Downloads the entire project code from GitHub to your computer.
cd Minimal-URL-Shortener
Moves into the project folder you just downloaded.
2. Docker
Easy RecommendedPrerequisites
- Git Needed to download the project code from GitHub.
- Docker Desktop Needed to build and run containers. Install it and keep it running in the background.
docker run -it mcr.microsoft.com/dotnet/sdk:6.0-alpine sh
Runs the built image as an actual container.
docker build -t url-shortener-net6 .
Builds a runnable image based on the Dockerfile.
docker run -it --rm -p 8080:80 url-shortener-net6
Runs the built image as an actual container.
Run docker compose ps to check the containers are Up. If the README mentions a port, open http://localhost:PORT in your browser.
Pulled directly from this repo's README.
3. .NET
MediumPrerequisites
dotnet new web
Type this command into your terminal and run it.
docker run -it mcr.microsoft.com/dotnet/sdk:6.0-alpine sh
Runs the built image as an actual container.
/ # dotnet --info
Type this command into your terminal and run it.
/ # dotnet new web
Type this command into your terminal and run it.
After dotnet run, check the message or address shown in the terminal.
Pulled directly from this repo's README.
// repository documentation
Was this content helpful?
(0 ratings)
