Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# MUIO Environment Variables — copy this file to .env and fill in the values
# NEVER commit the .env file to version control

# -------------------------------------------------------------------
# Flask Security (REQUIRED)
# Generate a strong key with: python -c "import secrets; print(secrets.token_hex(32))"
# -------------------------------------------------------------------
SECRET_KEY=your-strong-random-secret-key-here

# -------------------------------------------------------------------
# Server Configuration (optional — defaults shown)
# -------------------------------------------------------------------
PORT=5002

# -------------------------------------------------------------------
# Deployment Mode
# Set to 0 for local/Windows, 1 for Heroku/cloud
# -------------------------------------------------------------------
HEROKU_DEPLOY=0

# -------------------------------------------------------------------
# AWS S3 Sync (optional — leave blank to disable cloud sync)
# -------------------------------------------------------------------
AWS_SYNC=0
S3_BUCKET=
S3_KEY=
S3_SECRET=
5 changes: 4 additions & 1 deletion API/app.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#import sys
import os
import sys
from dotenv import load_dotenv

load_dotenv() # loads variables from .env into os.environ

from flask import Flask, jsonify, request, session, render_template
from flask_cors import CORS
Expand Down Expand Up @@ -42,7 +45,7 @@
app = Flask(__name__, static_url_path='', static_folder=static_dir, template_folder=template_dir)

app.permanent_session_lifetime = timedelta(days=5)
app.config['SECRET_KEY'] = '12345'
app.config['SECRET_KEY'] = os.environ.get('SECRET_KEY', 'INSECURE-DEV-KEY-CHANGE-ME')
app.config["MAX_CONTENT_LENGTH"] = None

app.register_blueprint(upload_api)
Expand Down