gothere
v1.0.1
Published
Super simple static url shortner
Readme
Gothere
Static super simple url shortner
Installation
yarn add gothereor with npm
npm install -S gothereUsage
Run
gothere --config path/to/my/config.jsand 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'
}
]
}