Browse Source

Allows CORS

master
Ceda EI 3 years ago
parent
commit
1f0a05ca9d
  1. 2
      README.md
  2. 2
      server.py

2
README.md

@ -22,7 +22,7 @@ Source code for [Questable Bot](https://t.me/questable_bot) and the relevant
## Questable API Server
+ Install the dependencies
+ `pip3 install Flask`
+ `pip3 install Flask flask_cors`
+ Install `gunicorn`
+ `pip3 install gunicorn`
+ Run `gunicorn3 -b 127.0.0.1:5000 server:app`. Change port if you want to run

2
server.py

@ -4,8 +4,10 @@ import questable
import sqlite3
import errors
from flask import Flask, jsonify, request, redirect
from flask_cors import CORS
app = Flask(__name__)
CORS(app)
db = sqlite3.connect("questable.db", check_same_thread=False)

Loading…
Cancel
Save