server.py 393 B

123456789101112131415
  1. import connection
  2. import db
  3. import subprocess
  4. from bottle import run, post, request, response, get, route
  5. if __name__ == '__main__':
  6. print('sqlite3.version', db.db.version)
  7. db.setup()
  8. @route('/<path>', method='POST')
  9. def process(path):
  10. return subprocess.check_output(['python', path + '.py'], shell=True)
  11. run(host='localhost', port=connection.port, debug=True)