flaskr.py 366 B

123456789101112131415161718192021
  1. """
  2. Website for Craftbroec RR stuff
  3. """
  4. from subprocess import call
  5. from flask import jsonify
  6. from app import app
  7. @app.route('/')
  8. def index():
  9. """Show index page"""
  10. return jsonify(True)
  11. @app.route('/deploy', methods=['POST'])
  12. def deploy():
  13. """Run deploy script"""
  14. call(["git", "pull"])
  15. call(["touch", "flask.wsgi"])
  16. return jsonify(True)