Added app
This commit is contained in:
parent
9716d6a464
commit
73d9535a5d
@ -1,2 +1,7 @@
|
|||||||
# walduni
|
# Walduni
|
||||||
Unoffical link shortner for TU Ilmenau
|
Unoffical link shortner for TU Ilmenau
|
||||||
|
|
||||||
|
You can access the link via https://walduni.de/<link>
|
||||||
|
|
||||||
|
## Contribute
|
||||||
|
Clone the repo, add your link and do a pull-request.
|
||||||
|
20
app.py
Normal file
20
app.py
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
import os
|
||||||
|
from flask import Flask,redirect
|
||||||
|
|
||||||
|
app = Flask(__name__)
|
||||||
|
|
||||||
|
@app.route('/')
|
||||||
|
def tu_ilmenau():
|
||||||
|
return redirect("https://www.tu-ilmenau.de/", code=302)
|
||||||
|
|
||||||
|
@app.route('/about')
|
||||||
|
def about():
|
||||||
|
return redirect("https://github.com/clerie/walduni", code=302)
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
# Bind to PORT if defined, otherwise default to 5000.
|
||||||
|
port = int(os.environ.get('PORT', 5000))
|
||||||
|
app.run(host='0.0.0.0', port=port)
|
1
requirements.txt
Normal file
1
requirements.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
Flask=1.1.1
|
Loading…
Reference in New Issue
Block a user