2024-12-08 01:16:03 +01:00
2024-12-08 01:16:03 +01:00
2024-12-07 22:38:43 +01:00
2024-12-08 00:10:54 +01:00
2024-12-08 00:10:54 +01:00
2024-12-07 20:59:41 +01:00
2024-12-07 23:51:34 +01:00
2024-12-07 23:12:56 +01:00

shortn logo

shortn

Pure vanilla HTML/CSS/JS • Lightweight • Functional • No plaintext passwords

Simple link shortener built with flask.

Warning

PLEASE CHANGE THE SECRET IN app.py BEFORE RUNNING IN PRODUCTION (this applies to the docker installation as well)

Installation (no docker)

git clone https://git.confest.im/boyan_k/shortn
pip install -r requirements.txt

Usage

python manage_users.py init # to create the database
python manage_users.py add # to add a user
>>> Name: admin
>>> Password: *****
>>> Again: *****

python manage_users.py list # to list users
python manage_users.py remove --username <username> # to remove a user

# Finally, running the app
python app.py # Running on http://localhost:49152

Installation (docker)

This will init the database and create a user with the username admin and password admin.

docker compose up -d # remove -d for foreground, it is now running on http://localhost:49152

Users

sudo docker exec -it shortn python src/manage_users.py add
sudo docker exec -it shortn python src/manage_users.py list
sudo docker exec -it shortn python src/manage_users.py remove --username <username>

Note

The database is ephemeral and will be lost when the container is removed. That is intentional.

TODOs

  • basic UI (to add links)
  • basic auth for UI
  • sqlite3 to store links
  • responsive? (sorta)
  • dockerize
Description
Simple link shortener with flask
Readme 229 KiB
Languages
Python 42.6%
HTML 27%
CSS 16.7%
JavaScript 11.7%
Dockerfile 2%