Pablo Solar VilariƱo
2020-03-10 4a56830b1f040885237ffe51db52c9c13d290522
Provide currency microservice (#1)

* Initial release of the currencies microservice

* Added CORS handling
4 files added
33 ■■■■■ changed files
mczernek-exchange-application/currencies/.gitignore 8 ●●●●● patch | view | raw | blame | history
mczernek-exchange-application/currencies/Dockerfile 14 ●●●●● patch | view | raw | blame | history
mczernek-exchange-application/currencies/requirements.txt 2 ●●●●● patch | view | raw | blame | history
mczernek-exchange-application/currencies/src/currencies.py 9 ●●●●● patch | view | raw | blame | history
mczernek-exchange-application/currencies/.gitignore
New file
@@ -0,0 +1,8 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/venv
__pycache__
# misc
.DS_Store
mczernek-exchange-application/currencies/Dockerfile
New file
@@ -0,0 +1,14 @@
FROM ubi8/python-36
ENV FLASK_APP="currencies.py"
COPY src /app
COPY requirements.txt /app
WORKDIR /app
RUN pip install -r requirements.txt
EXPOSE 5000
CMD [ "flask", "run", "--host=0.0.0.0"]
mczernek-exchange-application/currencies/requirements.txt
New file
@@ -0,0 +1,2 @@
Flask
flask-cors
mczernek-exchange-application/currencies/src/currencies.py
New file
@@ -0,0 +1,9 @@
from flask import Flask, jsonify
from flask_cors import CORS
app = Flask(__name__)
CORS(app)
@app.route('/')
def currenciesList():
    return jsonify('EUR', 'USD')