TidyURL is a Ruby on Rails application that allows users to shorten URLs. It provides a simple interface for creating and managing shortened links.
Check out the Demo of the app.
To get started with TidyUrl, clone the repository and install the necessary dependencies:
git clone https://github.com/thinhnw/tidy-url.git
cd tidy-url
bin/setup
This will install all required gems and prepare the database.
To start the development server, run:
bin/dev
You can then access the application at http://localhost:3000
.
Before running the application, ensure you have the following environment variables set in your .env
file:
POSTGRES_USERNAME=your_username
POSTGRES_PASSWORD=your_password
POSTGRES_DATABASE=tidyurl
POSTGRES_HOST=db
To set up the database, run:
bin/rails db:setup
This command will create the database, run migrations, and load the seed data.
To run the test suite, use the following command:
bin/rails test
For deployment, you can use Docker. Build the Docker image with:
docker compose up