Skip to content

Latest commit

 

History

History
31 lines (21 loc) · 1.09 KB

README.md

File metadata and controls

31 lines (21 loc) · 1.09 KB

whoami-python

Simple webapp that shows your IP address and stores it with database along with a timestamp. It can also show the visitors on a map.

Usage

Development

Run the application in development mode:

export FLASK_APP=run.py
export FLASK_ENV=development
flask run

This will start the development server with debug mode enabled and auto-reload on code changes.

Production use

The recommended way is running with gunicorn (uncomment gunicorn in requirements.txt):

gunicorn run:app

Environment Variables

Name Description Default Documentation
DATABASE_URL PostgreSQL connection string in the format postgresql://user:password@host:port/dbname sqlite:///:memory: SQLAlchemy Database URLs
WEB_CONCURRENCY Number of worker processes for handling requests (production use) 1 (can be set by PaaS like Heroku) Gunicorn Worker Configuration