Categorygithub.com/vvatelot/url-shortener
repositorypackage
0.1.0
Repository: https://github.com/vvatelot/url-shortener.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# README

Go Url Shortener

This project aims to provide a simple solution to create short urls.

It is built in Golang and Fiber to provide great performance and be as light as possible and can be deployed using Docker or directly on your server.

🛠️ Tech Stack

🛠️ Install Dependencies

go mod download

🧑🏻‍💻 Usage

To start the project, you first need configure your .env file. You can use the .env.dist file as a template:

cp .env.dist .env

Then you can launch your project simply using air command:

air

You can also use docker compose to launch the project:

cp docker-compose.yml.dist docker-compose.yml
docker-compose up -d --build && docker-compose logs -f

You can now reach your application instance on http://localhost:3001 depending on your configuration.

🔧 Configuration

Environment variables

NameDescriptionDefault value
APP_PORTDefault application listen port3001
DATABASE_URIDatabase connection stringurl_shortener.db
ENVApplication environment (can be dev or prod)dev
ADMIN_PASSWORDAdmin password to access the admin panelpassword
LOCALEApplication localefr

When using docker, you must set the environment variables in the docker-compose-override.yml file. You can override the default values of the docker-compose.yml file.

License

Contributing

Code of conduct