QuickLinc is a powerful URL shortening service that integrates with Discord, allowing users to generate and share shortened URLs seamlessly using the /squeeze
command.
QuickLinc is hosted on Vercel - quicklinc-1.vercel.app
https://roadmap.sh/projects/url-shortening-service
- Generate shortened URLs via a Discord bot.
- Store and retrieve URLs using a PostgreSQL database.
- Web API to shorten and resolve URLs.
- Node.js (version 16 or higher)
- Discord app
Ensure you have a .env
file with the following variables:
DISCORD_TOKEN=<Your_Discord_Bot_Token>
PG_CONNECTION_STRING=<Your_PostgreSQL_Connection_String>
git clone https://github.com/iamavichal-geek/quicklinc.git
cd quicklinc
npm install
nodemon deadend.js
- Open Discord and invite the bot to your server using your TOKEN and CLIENT_ID.
- Use the
/squeeze
command followed by the URL you want to shorten. For example:/squeeze https://www.example.com/some/long/url
- The bot will respond with a shortened URL, such as:
Your shortened URL: https://quicklinc-1.vercel.app/api/short/abc123
- Share the shortened URL with others.
- Visiting the shortened URL will redirect to the original URL.
You can also interact with the service via its API:
- Create Short URL:
POST /api/short Content-Type: application/json { "url": "https://www.example.com/some/long/url" }
- Resolve Short URL:
GET /api/short/:shortCode
- Ensure your PostgreSQL server is running and accessible.
- Use
nodemon
to start the server for development:nodemon deadend.js
Ensure the Discord bot is registered with the /squeeze
command for proper functionality.
- Database Connection Issues: Ensure your
PG_CONNECTION_STRING
is correct and the PostgreSQL server is running. - Bot Not Responding: Verify the bot is online and has the necessary permissions in your Discord server.
Monitor the console output for logs and errors.
Contributions are welcome! Please open an issue or submit a pull request for any bugs or enhancements.
This project is licensed under the MIT License. See the LICENSE
file for details.
For any questions or support, please contact:
- Avichal Trivedi
- [email protected]
Happy /sqeezing (skull)!