--- /dev/null
+from flask import Flask
+app = Flask(__name__)
+
+@app.route('/')
+def hello_world():
+ return 'hello'
\ No newline at end of file
--- /dev/null
+from flask import Flask
+app = Flask(__name__)
+
+@app.route('/')
+def hello_world():
+ return 'hello'
\ No newline at end of file
--- /dev/null
+from flask import Flask, Blueprint
+
+from weddingcard import router as weddingcard
+
+app= Flask(__name__)
+
+app.register_blueprint(weddingcard.app)
\ No newline at end of file
--- /dev/null
+from flask import Flask
+
+from weddingcard import url as weddingcard
+
+app = Flask(__name__)
+
+@app.route('/weddingcard')
+def hello_world():
+ return weddingcard
\ No newline at end of file
--- /dev/null
+from flask import Flask, Blueprint
+
+from guestbook import service as guestbook
+
+app= Flask(__name__)
+
+URL = Blueprint('weddingcard', __name__, url_prefix= '/weddingcard')
+
+
+app.register_blueprint(guestbook.app)
\ No newline at end of file
--- /dev/null
+from flask import request
+from flask_restx import Resource, Api, Namespace
+
+api= Namespace('guestbook')
+
+@api.route('/')
+def index():
+ return 'hi'
\ No newline at end of file
--- /dev/null
+import json
+from flask import jsonify
+from ..library.db import db as DB
+from sqlalchemy import text
+
+def index():
+ return DB.test()
+
+def get():
+ return 'get'
+
+def post():
+ return 'post'
+
+def put():
+ return 'put'
+
+def delete():
+ return 'delete'
\ No newline at end of file
--- /dev/null
+# /config.py
+
+db_weddingcard= {
+ 'user': 'insang',
+ 'password': 'Whtkd530823#',
+ 'host': 'localhost',
+ 'port': '3306',
+ 'database': 'weddingcard',
+}
+
+url= "mysql+mysqlconnector://insang:Whtkd530823#@localhost:3306/weddingcard?charset=utf8mb4"
\ No newline at end of file
--- /dev/null
+import pymysql, json, pprint
+from sqlalchemy import text
+
+def test():
+ db_connection = pymysql.connect(
+ user= 'insang',
+ passwd= 'Whtkd530823#',
+ host= 'insang.duckdns.org',
+ db= 'weddingcard',
+ charset= 'utf8'
+ )
+ cursor= db_connection.cursor(pymysql.cursors.DictCursor)
+ cursor.execute("select * from guestbook")
+ # result= json.dumps(cursor.fetchall(), ensure_ascii=True)
+ result= cursor.fetchall()
+ return MyPrettyPrinter().pprint(result)
+
+
+class MyPrettyPrinter(pprint.PrettyPrinter):
+ def format(self, _object, context, maxlevels, level):
+ if isinstance(_object, str):
+ return "'%s'" % _object.encode('utf8'), True, False
+ elif isinstance(_object, str):
+ _object = str(_object, 'utf8')
+ return "'%s'" % _object.encode('utf8'), True, False
+ return pprint.PrettyPrinter.format(self, _object, context, maxlevels, level)
\ No newline at end of file
--- /dev/null
+from flask import request, Blueprint
+
+from .guestbook import service as guestbook
+
+app = Blueprint('weddingcard', __name__, url_prefix= '/weddingcard')
+
+# region guestbook section
+
+@app.route('/guestbook/')
+def index():
+ return guestbook.index()
+
+@app.route('/guestbook/get')
+def get():
+ return guestbook.get()
+
+@app.route('/guestbook/post')
+def post():
+ return guestbook.post()
+
+@app.route('/guestbook/put')
+def put():
+ return guestbook.put()
+@app.route('/guestbook/delete')
+def delete():
+ return guestbook.delete()
+
+# endregion
+
--- /dev/null
+from flask import Flask, Blueprint
+from flask_restx import Resource, Api
+
+from guestbook import model as guestbook
+
+# region 상수 선언
+NAME_URL= __name__.split('.')[0]
+# endregion
+
+app = Blueprint(NAME_URL, __name__, url_prefix= '/' + NAME_URL)
+api = Api(app)
+
+api.add_namespace(guestbook, '/guestbook')
\ No newline at end of file
--- /dev/null
+import sys
+sys.path.insert(0, '/var/www/apiserver/app')
+from router_main import app as application
\ No newline at end of file