A tiny express app to redirect traffic using a string template
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
tools
web
.dockerignore
.eslintrc.js
.gitignore
Dockerfile
README.md
REGISTRY
package-lock.json
package.json

README.md

Linkit

A tiny express app to redirect traffic using a string template

Environment Variables

Name Use
URL_TEMPLATE A template to redirect the user where {0} is replaced with the 1st url parmeter
HOME_URL A url to redirect the user if they hit home, i.e. /

Sample run

docker run -it --rm -p 3000:3000 \
  -e "HOME_URL=https://github.com/robb-j/" \
  -e "URL_TEMPLATE=https://github.com/robb-j/{0}" \
  robbj/linkit

Dev Commands

# Start the app
npm run start

# Start the app and reload on file changes
npm run watch

# Update version (builds & pushes a new docker image)
# -> Uses the REGISTRY file & the npm version to tag image
npm version ... # --help

# Lint the web & test directories
npm run lint

# Run the unit tests
npm test

# Generate coverage, outputs to coverage/
npm run coverage

# Watch code with nodemon (restarts on file changes)
npm run watch