Allows CORS

This commit is contained in:
Ceda EI 2019-05-31 10:41:28 +05:30
parent d2b70dacd8
commit 1f0a05ca9d
2 changed files with 3 additions and 1 deletions

View File

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

View File

@ -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)