https://github.com/marekzelinka/url-shortener
URL shortener
https://github.com/marekzelinka/url-shortener
docker docker-compose fastify nodejs postgresql
Last synced: 3 months ago
JSON representation
URL shortener
- Host: GitHub
- URL: https://github.com/marekzelinka/url-shortener
- Owner: marekzelinka
- Created: 2024-10-17T05:38:50.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-17T09:57:18.000Z (over 1 year ago)
- Last Synced: 2025-12-26T20:11:02.004Z (6 months ago)
- Topics: docker, docker-compose, fastify, nodejs, postgresql
- Language: JavaScript
- Homepage:
- Size: 234 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# URL Shortener
This URL shortener application is built with Node.js, Fastify and PostgreSQL. It serves as a demo on how to use docker and docker compose to run a production build of a Full-stack web app.

## 🟢 Prerequisites
- Prior Node.js development experience.
- Familiarity with the Linux command-line.
- Access to a Linux machine with
[Docker Engine](https://docs.docker.com/engine/install/) installed.
## Getting started
- Clone this repo to your machine:
```bash
git clone https://github.com/marekzelinka/url-shortener
```
- Execute the command below to start the production server:
```bash
docker compose up --build
```
- Visit http://localhost:5000 in your browser.
## How to use
- Enter a URL into the input field and click **Shorten!**. The shortened URL
will be displayed on the page.
- Click the **Visit** button to open the shortened URL in a new tab. It should
redirect you to the original URL.
## Credits
- **Tutorial**:
[A Comprehensive Guide to Dockerizing Node.js Applications](https://betterstack.com/community/guides/scaling-nodejs/dockerize-nodejs/)