An open API service indexing awesome lists of open source software.

https://github.com/tuhinpal/url-shorten-api

Serverless URL Shortener API (Nodejs + MongoDB + Vercel)
https://github.com/tuhinpal/url-shorten-api

mongoclient mongodb serverless serverless-functions url-shortener vercel vercel-serverless

Last synced: about 2 months ago
JSON representation

Serverless URL Shortener API (Nodejs + MongoDB + Vercel)

Awesome Lists containing this project

README

        

## Url Shorten API
[![Watch it on YouTube](https://img.shields.io/badge/Watch%20it%20on%20youtube-red?style=for-the-badge&logo=youtube "Watch it on YouTube")](https://youtu.be/TmSohwAM6Ss "Watch it on YouTube")

### API Endpoints
**1. Create a Shortned Link (Get):**

*Request*

```
https://your-app-url.vercel.app/create?u={url}

##Ex.
https://url-shorten-api.vercel.app/create?u=https://thetuhin.com
```

*Response*

```json
{
"status": true,
"link": "https://url-shorten-api.vercel.app/?i=1603985599nRrMuJ",
"unique_id": "1603985599nRrMuJ",
"timestamp": 1603985599
}
```

**2. Get Main URL from Shortened URL (Get):**

*Request*

```
https://your-app-url.vercel.app/?i={unique-id}

##Ex.
https://url-shorten-api.vercel.app/?i=1603985599nRrMuJ
```

*Response*

```json
{
"status": true,
"main_link": "https://thetuhin.com",
"created_at": 1603985599
}
```

### Make Your Own
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/git/external?repository-url=https%3A%2F%2Fgithub.com%2Fcachecleanerjeet%2Furl-shorten-api)

**Environment Variables**
- **APP_URL**

(Vercel Deployment Link - https://url-shorten-api.vercel.app)
- **DB_URL**

(MongoDB Url)

## Star this Repo if you Liked it ⭐⭐⭐




My Website & Social







Website

..

Instagram

..

YouTube

..

Telegram