A simple URL shortener application built with ASP.NET Core, Entity Framework Core, and PostgreSQL.
-
Clone the repository:
git clone https://github.com/jamwitk/url-shortener-dotnet.git cd shorturl
-
Install npm dependencies:
npm install
-
Set up the database:
Update the connection string in
appsettings.json
:"ConnectionStrings": { "UrlShortenerContext": "Host=localhost;Database=shorturl;Username=yourusername;Password=yourpassword" }
-
Apply migrations:
dotnet ef database update
-
Run the application:
dotnet run
-
Open your browser and navigate to your localhost
-
Publish the application:
dotnet publish -c Release
-
Deploy the published files to your server.
-
Ensure your server has the necessary environment variables set for the connection string.
-
Run the application on your server.
This project is licensed under the MIT License.