웹 개발강의/파이썬 웹개발
2021. 12. 10.
[파이썬 웹개발] 4_4_GET,POST 연습2 [나홀로메모장]
나홀로메모장 1. 서버(app.py) 1. 서버(app.py) from flask import Flask, render_template, jsonify, request app = Flask(__name__) import requests from bs4 import BeautifulSoup from pymongo import MongoClient client = MongoClient('localhost', 27017) db = client.dbsparta ## HTML을 주는 부분 @app.route('/') def home(): return render_template('index.html') @app.route('/memo', methods=['GET']) def listing(): articles =..