diff --git a/README.md b/README.md index 8c49b1a..b5b247c 100644 --- a/README.md +++ b/README.md @@ -22,12 +22,6 @@ To run the development server run, you MUST have run `pip install` first: gunicorn -c gunicorn.config.py dev:api ``` -Due to production container using .pipfiles and pipenv make sure to run the following to regenerate the pip files before a release commit: -```shell -# Run this in dev container -pipenv install -r requirements.txt -``` - ## Caveats Currently there is no git in the container so you can't see what's been edited or not, git will have to be managed from the host. diff --git a/app.py b/app.py index 16b1d9c..ed2a70b 100644 --- a/app.py +++ b/app.py @@ -2,6 +2,7 @@ from bs4 import BeautifulSoup from markdown import markdown from flask import Flask from flask_restful import Api, Resource, reqparse +from flask_cors import CORS import random import os @@ -95,6 +96,7 @@ def _add_a_attrs(soup): api = Flask(__name__) +CORS(api) _api = Api(api) _api.add_resource(Post, "/post/") diff --git a/requirements.txt b/requirements.txt index 2f1c032..c447569 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,14 +1,22 @@ -# To ensure app dependencies are ported from your virtual environment/host machine into your container, run 'pip freeze > requirements.txt' in the terminal to overwrite this file -flask==1.1.2 -gunicorn==20.0.4 -aniso8601==9.0.1 -beautifulsoup4==4.9.3 -click==8.0.1 -Flask-RESTful==0.3.9 -itsdangerous==2.0.1 -Jinja2==3.0.1 -Markdown==3.3.4 -MarkupSafe==2.0.1 -pytz==2021.1 -six==1.16.0 -soupsieve==2.2.1 +aniso8601==9.0.1 +appdirs==1.4.4 +beautifulsoup4==4.9.3 +certifi==2021.5.30 +click==8.0.1 +distlib==0.3.2 +filelock==3.0.12 +Flask==1.1.2 +Flask-Cors==3.0.10 +Flask-RESTful==0.3.9 +gunicorn==20.0.4 +itsdangerous==2.0.1 +Jinja2==3.0.1 +Markdown==3.3.4 +MarkupSafe==2.0.1 +pipenv==2021.5.29 +pytz==2021.1 +six==1.16.0 +soupsieve==2.2.1 +virtualenv==20.4.7 +virtualenv-clone==0.5.4 +Werkzeug==2.0.1