link_shortener/server.py
Raphael Maenle 85850a9d63 initial commit, adding flask structure, README, routes
- routes defined in routes.py uses the <path:..> function to catch
  every non-empty url comming along
- request.full_path is used to get the entire url, as <path:> would
  remove eg GET '?' from the url, which we don't want
  for the link forwarding.
- request.full_path[1:] removes the '/' from the url
2021-08-12 11:50:22 +02:00

9 lines
189 B
Python
Executable File

from app import app
@app.shell_context_processor
def make_shell_context():
return{'app': app, 'position': Position}
if __name__ == '__main__':
app.run('0.0.0.0', 8088, debug=True)