Skip to content

About

URL shortener service

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

13 Commits

Folders and files

Repository files navigation

Node URL Shortener

URL shortener service

Getting Started

This solution uses Docker and Docker Compose.

# Install dependencies (required for development with hot reload)
npm install

# Run the service
docker compose up

# Create a new short URL
curl -X POST -H "Content-Type: application/json" \
    -d '{"original_url": "https://github.com/brenobaptista"}' \
    http://localhost:3000/urls

# Get the original URL back
curl http://localhost:3000/{hash}

# Stop and remove containers and networks created by "up" (keep volumes and images).
docker compose down

# Stop and remove containers, networks, images and volumes created by "up".
docker compose down --rmi all -v

Database Connection

Connect to the PostgreSQL database using any SQL client (e.g., Beekeeper Studio, pgAdmin, DBeaver):

Property Value
Host localhost
Port 5432
Database url_shortener
User user
Password password

Author

brenobaptista
Breno Baptista

License

This project is licensed under the MIT License

About

URL shortener service

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Contributors

Languages