wavly / shawty

Tool for shortening long URLs
MIT License
5 stars 0 forks source link
full-stack golang golang-server htmx turso url-shortener web-server

Shawty

Shawty is a URL shortener built using Golang, Turso and HTMX. It provides a simple web interface for shortening URLs, tracking their usage, and offering statistics about shortened URLs.

Features

Getting Started

Prerequisites

Installation and Setup

  1. Clone the repository:
    git clone https://github.com/wavly/shawty.git
    cd shawty
  2. Set ENV Variables:

    Get the database URL and Token from: Turso Docs. Only needed if you're going to run the server in prod mode else the server would create a temporary sqlite3 database in the project directory

    cp .env .env.local
  3. Install the dependencies:
    go mod tidy
  4. Run the server:
    go run .
  5. Access the web interface on port: 1920:
    xdg-open http://localhost:1920

Development

Use the make command to run/build the web server.

[!NOTE] Make sure the ENVIROMENT variable in .evn.local is set to dev in order run the server in development mode.

Requirements

Tools you'll be needing for development:

Make Commands

Contributing

We welcome any contributions to this project! For major changes, please open an issue first to discuss what you would like to change.

LICENSE