17 lines
No EOL
436 B
Python
17 lines
No EOL
436 B
Python
from flask import Flask, jsonify, send_from_directory
|
|
from flask_cors import CORS
|
|
|
|
# instantiate the app
|
|
app = Flask(__name__, static_url_path='/static', static_folder='stockingly-frontend/dist')
|
|
app.config.from_object(__name__)
|
|
|
|
# enable CORS
|
|
CORS(app, resources={r'/*': {'origins': '*'}})
|
|
|
|
# sanity check route
|
|
@app.route('/ping', methods=['GET'])
|
|
def ping_pong():
|
|
return jsonify('pong!')
|
|
|
|
if __name__ == '__main__':
|
|
app.run() |