Skip to content

Commit

Permalink
flask running
Browse files Browse the repository at this point in the history
  • Loading branch information
scr1104 committed May 2, 2023
1 parent 51960f2 commit 7e0ec41
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions app.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
from flask import Flask, send_from_directory
from flask import Flask
from flask_restful import Api, Resource, reqparse
from flask_cors import CORS # comment this on deployment
from api.HelloApiHandler import HelloApiHandler
# from flask_cors import CORS # comment this on deployment

app = Flask(__name__, static_url_path='', static_folder='frontend/build')
CORS(app) # comment this on deployment
# CORS(app) # comment this on deployment
api = Api(app)

@app.route('/')
def hello():
return '\u3145 \u3142 \20 \u3148 \uAC19 \uB2E4'

@app.route("/", defaults={'path': ''})
def serve(path):
return send_from_directory(app.static_folder, 'index.html')


api.add_resource(HelloApiHandler, '/flask/hello')
if __name__ == '__main__':
app.run(debug=True)
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ charset-normalizer==3.1.0
click==8.1.3
Flask==2.3.2
Flask-Cors==3.0.10
Flask-RESTful==0.3.9
flask-restful==0.3.9
idna==3.4
itsdangerous==2.1.2
Jinja2==3.1.2
Expand Down

0 comments on commit 7e0ec41

Please sign in to comment.