-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.py
33 lines (22 loc) · 860 Bytes
/
app.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import boto3
from flask_cors import CORS
from flask import Flask, jsonify
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql+pymysql://dbmasteruser:cnoEmmbwVyVqtclAa=oXZaJ|Be)97IPb@ls-3c782e648da44e5f1c1a7fdd417c12f22f5ac9df.c7tr5x3jfbuc.ap-northeast-2.rds.amazonaws.com:3306/furiosa-database'
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
s3 = boto3.client('s3',
aws_access_key_id="AKIAVDWNEKJDPVUDCWD7",
aws_secret_access_key="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",
region_name="ap-northeast-2"
)
app.secret_key = 'secret key'
CORS(app)
@app.route('/')
def home():
return jsonify({'message': 'Hello World!'}), 200
if __name__ == '__main__':
from src.router import api
from src.db import db
app.register_blueprint(api)
db.init_app(app)
app.run(host='0.0.0.0', port=5002, debug=True)