This project is a URL shortening service and a link management platform.
Use the flowing commands to setup database migration.
dotnet tool install --global dotnet-ef
dotnet ef migrations add $migration_name
dotnet ef database update
Use flowing command for use last migrated database.
dotnet ef database update
Use the flowing command to run the project.
dotnet run
Now listening on: http://localhost:5000
for create a short url use this curl command:
curl --location --request POST 'http://localhost:5000/urls' \
--header 'Content-Type: application/json' \
--data-raw '{"Url" : "$LongUrl}'
for redirect to your url:
curl --location --request GET "http://localhost:5000/redirect/$ShortUrl"
created by Mohammad Noormohammadi