1.0.1 • Published 5 years ago
gothere v1.0.1
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:
property | type | description |
---|---|---|
name | string | Title of your redirecting site |
outFilePath | string | Filename of HTML file generated by gothere |
fallbackUrl | string | Gothere will redirect to that URL in case there is no match in db |
redirects | array | Array 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'
}
]
}