diff --git a/.gitignore b/.gitignore
index b8e4bfe..43ff6ce 100644
--- a/.gitignore
+++ b/.gitignore
/.venv
-__pycache__/
\ No newline at end of file
+__pycache__/
+.env
\ No newline at end of file
diff --git a/README.md b/README.md
index 1395b59..3ee97a5 100644
--- a/README.md
+++ b/README.md
Fast webview using pygit2 (lib2git) bindings. For my personal use, for now
<img width="1280" height="960" alt="image" src="https://github.com/user-attachments/assets/1ce40e5f-1eed-4085-a1b4-698aac9c557f" />
+
+## Setup
+
+1. Install dependencies
+
+ ```bash
+ pip install -r requirements.txt
+ ```
+
+2. Set the `GIT_REPO_PATH` in .env
+
+...
\ No newline at end of file
diff --git a/app.py b/app.py
index 79af3c8..d2fad78 100644
--- a/app.py
+++ b/app.py
+import os
from flask import Flask, render_template, request
from datetime import datetime
+from dotenv import load_dotenv
from git.repo import get_bare_repos
from git.commit import get_commits, get_commit
from git.diff import get_diff
from git.blame import get_blame
+load_dotenv()
+
app = Flask(__name__)
+repo_path = os.getenv('GIT_REPO_PATH')
+
def datetime_filter(value, format='%Y-%m-%d %H:%M:%S'):
if isinstance(value, datetime):
# format regular datetime
app.jinja_env.filters['datetime'] = datetime_filter
-repo_path = "/home/lhietala/git-webview/repos-example"
@app.route("/")
def index():
repos = get_bare_repos(repo_path)
diff --git a/requirements.txt b/requirements.txt
index 5d71ef0..1da7394 100644
--- a/requirements.txt
+++ b/requirements.txt
packaging==25.0
pycparser==2.23
pygit2==1.19.0
+python-dotenv==1.2.1
Werkzeug==3.1.3