Added app

This commit is contained in:
clerie 2019-12-13 15:00:50 +01:00
parent 9716d6a464
commit 73d9535a5d
3 changed files with 27 additions and 1 deletions

View File

@ -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
View 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
View File

@ -0,0 +1 @@
Flask=1.1.1