https://github.com/varundeva/shrtfly
shrtfly - Url Shortner [Unofficial NPM Package]
https://github.com/varundeva/shrtfly
shrtfly shrtflynpm
Last synced: 10 months ago
JSON representation
shrtfly - Url Shortner [Unofficial NPM Package]
- Host: GitHub
- URL: https://github.com/varundeva/shrtfly
- Owner: varundeva
- Created: 2022-03-06T17:32:02.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-07-22T17:20:47.000Z (over 1 year ago)
- Last Synced: 2025-03-03T11:48:43.669Z (11 months ago)
- Topics: shrtfly, shrtflynpm
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/shrtfly
- Size: 82 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## shrtfly - Url Shortner [Unofficial Package]
# What's the .env variables?
- Two .env required, one is optional
- You can also refer [.env Example](https://github.com/varundeva/shrtfly/blob/main/.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](https://shrtfly.com/ref/freesv)
# 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.
