Hack Clubโs Postgres-Based Link Shortener
Using Nix, run
nix-shell
Otherwise, you'll need:
nodejs
npm
- Create a postgres database
- Add its
DATABASE_URL
to your environment - Run
npx prisma migrate deploy
to configure your database
- Set
LOGGING
toon
if you want to enable logging,off
if otherwise. - Set
BOT_LOGGING
toon
if you want to enable logging for crawlers,off
if otherwise. - Set
CACHE_EXPIRATION
to the number of seconds you want the local cache to be valid.
All links will be routed through a 302 (Temporary Redirect). Simply visit example.com/slug
to get redirected.
This project is released under the MIT license.