1.0.1 • Published 5 years ago

gothere v1.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

Gothere

Static super simple url shortner

Installation

yarn add gothere

or with npm

npm install -S gothere

Usage

Run

gothere --config path/to/my/config.js

and deploy!

Configuration

Config file should export following:

propertytypedescription
namestringTitle of your redirecting site
outFilePathstringFilename of HTML file generated by gothere
fallbackUrlstringGothere will redirect to that URL in case there is no match in db
redirectsarrayArray of objects containing path and url properties. path is unique nice page ID (ex. myshortner.com/path). url is the url where gothere will redirect to

example config file:

module.exports = {
    name: 'my shortner name',
    outFilePath: 'index.html',
    fallbackUrl: 'https://example.com/not-found',
    redirects: [
        {
            path: 'search', // example.com/search -> https://google.com
            url: 'https://google.com'
        }
    ]
}