agdsn / lonk

For when your links are too lonk.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LONK

For when your links are too lonk.

Running

To run uwsgi for production, run poetry run uwsgi <options>, for instance:

docker run -p 5000:5000 \
  -v $(pwd)/lonk:/opt/lonk/lonk \
  --rm lonk \
  poetry run uwsgi \
    --python-path /opt/lonk \
    -s 0.0.0.0:5000 \
    --mount /=lonk.app:app

…of course, you should add more uwsgi options to establish sane defaults on a production instance, but this is just for a self-contained example.

For a development setup, you might want to run:

docker run -p 5001:5000 \
  -v $(pwd)/lonk:/opt/lonk/lonk \
  -e FLASK_ENV=development \
  --rm lonk \
  poetry run flask run

See also this doc on how to configure the flask cli.

Testing

Just run it locally with poetry and run pytest tests

About

For when your links are too lonk.

License:MIT License


Languages

Language:Python 78.7%Language:Dockerfile 21.3%