/shorty

This repository is for URL shortening.

Primary LanguageC#

About The Project

Shorty is a link shortening service. It's 'free to use' for retail users. You can access to the service on Shorty

For local usage with Sqlite you can add new migrations with this command

Creating new migration: (no need for initial usage)

dotnet ef migrations add InitialMigration -o Infrastructure\Data\SomeMigrationName

Or use existing one:

Updating database:

dotnet ef database update

Adding to systemctl startup task for nginx

  • nano /etc/systemd/system/shorty.service

[Unit]
Description=Shorty .NET Application
After=network.target

[Service]
WorkingDirectory=/home/kadir/shorty/Shorty.Api/bin/Release/net8.0/publish
ExecStart=/usr/bin/dotnet Shorty.Api.dll --urls http://*:5001
Restart=on-failure
RestartSec=10
KillSignal=SIGINT
SyslogIdentifier=shorty-api
User='sudo user name'
Environment=ASPNETCORE_ENVIRONMENT=Production

[Install]
WantedBy=multi-user.target

Restart systemctl task:

  • sudo systemctl restart shorty.service

Go to nginx path:

  • cd /etc/nginx/sites-available/