repl.it
@mat1/

repl auth example

Python

No description

fork
loading
Files
  • main.py
  • templates
  • Packager files
  • poetry.lock
  • pyproject.toml
  • requirements.txt
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
from flask import Flask, render_template, request
app = Flask('app')

@app.route('/')
def hello_world():
	return render_template(
		'index.html',
		user_id=request.headers['X-Replit-User-Id'],
		user_name=request.headers['X-Replit-User-Name'],
		user_roles=request.headers['X-Replit-User-Roles']
	)

app.run(host='0.0.0.0', port=8080)