- Two .env required, one is optional
- You can also refer .env Example
SHRTFLY_KEY=YOUR_API_KEY
//This must be added in shrtfly.com account
SHRTFLY_ALIAS=youralias.com
- You can create api key at Shrtfly - URL Shortner
- Install package using Inline
npm i shrtfly
- Import package
import {shortUrl} from "shrtfly"
- Use it Like
const longUrl = 'http://yourdomain.com' const url = shortUrl(longUrl)
- Done
- Ad preferences
- Your custom alias -> Mainstream is default now.
- Mainstream: 1
- Adult: 2
- Response format -> JSON/TEXT. Currently, JSON is the default.