Skip to content

varundeva/shrtfly

Repository files navigation

shrtfly - Url Shortner [Unofficial Package]

What's the .env variables?

  • 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

How to Use?

  • 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

To-do

  • Ad preferences
  • Your custom alias -> Mainstream is default now.
    • Mainstream: 1
    • Adult: 2
  • Response format -> JSON/TEXT. Currently, JSON is the default.