Skip to content

Latest commit

 

History

History
57 lines (46 loc) · 2.47 KB

README.md

File metadata and controls

57 lines (46 loc) · 2.47 KB

golinks

Simple go links server backed by airtable base.

Quick Start

For Chrome on Mac OS

  1. create a table in airtable with 1 column for short codes and 1 column for urls
  2. cp airtable.sample.config.json airtable.config.json and update
  3. npm install - install dependencies
  4. node server - run server on port 6060
    1. http://localhost:6060/go/<key> redirects to the link mapped to the given short code
    2. http://localhost:6060/ shows all short code to URL mappings (opens your airtable base)
    3. http://localhost:6060/reload will tell the server to reload the mapping file. do this after making changes in airtable.
  5. add a chome search engine. See help docs for more info
    1. Set name to go
    2. Set keyword to go
    3. Set URL to http://localhost:6060/go/%s
  6. an alternative to the previous step is to use the browser extension in the extension folder
    1. open your browser and go to its extension settings
    2. enable developer mode
    3. load unpacked
    4. select the extension folder
  7. open your browser and type go <space> then <short code> and you should redirect to the url that maps to the given short code

Run in background & at startup (Mac OS)

  1. npm install -g pm2
  2. pm2 start golink.config.js --env prod
  3. pm2 startup then follow the directions
  4. pm2 save
  5. read pm2 docs for more info

Airtable setup

  1. create a table in airtable with 1 column for short codes and 1 column for urls
  2. params for this table
    1. base = shrZOvefftUFNSZur
    2. table = links
    3. keyCol = key
    4. urlCol = url

Modify go links

  1. add or update items in your airtable base
  2. force a reload of the data by navigating to http://localhost:6060/reload

Parameterized Links

  1. you can define golinks for search engines
  2. eg, suppose you define short-code=g and url=https://www.google.com/search?q=%s
  3. in your browser, when you type g purple onions you will navigate to https://www.google.com/search?q=purple%20onions