@abeai/node-short-url
node.js URL shortener
Last updated a year ago by abeai-sam .
Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @abeai/node-short-url 
SYNC missed versions from official npm registry.

node-short-url

URL shortener for usage with node.js applications. Supports multiple backends.

Interface

Promise shorten(url[, opts])

Shorten a URL using the requested backend.

opts

  • backendType String

    • Provide a backend type to use or override process.env.NODE_SHORT_URL_BACKEND.
  • backendOptions Object

    • Backend specific options to use for short url generation.

Environment Variables

  • NODE_SHORT_URL_BACKEND
    • Define the short url backend to use. Can override with opts.backendType.

Backends

Firebase

https://firebase.google.com/docs/reference/dynamic-links/link-shortener

Create dynamic links via Firebase's API. Options are provided in the dynamicLinkInfo JSON format.

Default Options

  • suffix.option
    • Defaults to SHORT.

Required Environment Variables

  • NODE_SHORT_URL_FIREBASE_DOMAIN
  • NODE_SHORT_URL_FIREBASE_API_KEY
    • Can pass backendOptions.key to override.

Current Tags

  • 1.0.0                                ...           latest (a year ago)

1 Versions

  • 1.0.0                                ...           a year ago
Maintainers (2)
Downloads
Today 0
This Week 1
This Month 3
Last Day 0
Last Week 0
Last Month 0
Dependencies (4)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |