A basic link shortener that supports expiration dates and maximum view counts. You can self host it yourself.
This is an MVP and may have bugs. Please don't use in a production instance.
Want to see how this project works?
https://shorten.octotwelve.xyz
There are limitations to help avoid people using it as an actual link shortener.
You'll need node and npm.
Go to the .env.example file and rename it to .env. Then, generate a better auth secret. Then change the better auth URL and site URL to your domain (incl. http:// or https://). Put in a postgres database URL in the DATABASE_URL env var. You can also choose to require logins to use the link shortener.
Run the following in your terminal:
npm i
npx prisma generate && npx prisma db push
npm build
npm start
m start
rt
Open localhost:3000 in your browser to see the result.
Follow the environment variable instructions above. Then run the following in your terminal:
npm i
npx prisma generate && npx prisma db push
npm run dev
run dev
v
Open localhost:3000 in your browser to see the result.