cycomachead / bjc.link

A small Redis-based URL Redirector
MIT License
0 stars 0 forks source link
heroku redirects redis url-redirector url-shortener

bjc.link

A small Redis-based URL Redirect. The original base for bjc.link was built from redisred.

Features

Everyone

Admins

API

All requests must be authenticated with a x-access-token header.

How to get up and running

Some quick easy steps:

  1. Make sure you have gcc, brew, node, and npm installed.
  2. Run brew install redis
  3. Run npm install && npm run create-config
  4. Edit the .env file to have the environment variables you like :)

How to run the app locally

npm run start (To stop the server, Ctrl+C)

Environment variables.

Variable Description
PORT The port this app should run on
ADMIN_EMAIL The email of the first admin
API_TOKEN The token to be used on all API calls
DOMAIN The url the site will be hosted from
GOOGLE_ANALYTICS_ID Track visits with Google Analytics
GOOGLE_CLIENT_ID Google OAuth Client id (from app console)
GOOGLE_CLIENT_SECRET Google OAuth Client secret (from app console)
ROOT_REDIRECT The URL the root of your website should redirect to
SESSION_SECRET A secret key for verifying the integrity of signed cookies

License

bjc.link is released under the MIT license.