Skip to content

Commit

Permalink
Add basic flask app
Browse files Browse the repository at this point in the history
  • Loading branch information
JackPlowman committed Apr 3, 2024
1 parent 5293976 commit 3bcc887
Show file tree
Hide file tree
Showing 13 changed files with 19 additions and 367 deletions.
17 changes: 0 additions & 17 deletions sandbox/.eslintrc.js

This file was deleted.

3 changes: 3 additions & 0 deletions sandbox/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
poetry.lock
poetry.toml
pyproject.toml
4 changes: 0 additions & 4 deletions sandbox/.mocharc.yml

This file was deleted.

8 changes: 5 additions & 3 deletions sandbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
FROM node:12
FROM python:3.9

COPY . /sandbox

WORKDIR /sandbox

RUN npm install
RUN pip install poetry

RUN poetry install --only sandbox

EXPOSE 9000

CMD ["npm", "start"]
CMD ["poetry", "run", "gunicorn", "app:app", "--bind=localhost:9000"]
18 changes: 4 additions & 14 deletions sandbox/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,9 @@ list:
@grep '^[^#[:space:]].*:' Makefile

build:
docker build .

clean:
rm -rf ./node_modules

install:
npm install --dev

update:
npm update
cp ../pyproject.toml . && cp ../poetry.lock . && cp ../poetry.toml .
docker build -t validate-relationships-service-api-sandbox .
rm -f pyproject.toml poetry.lock poetry.toml

test:
NODE_ENV=test npx mocha --reporter spec

test-report:
NODE_ENV=test npx mocha --reporter mocha-junit-reporter --reporter-options mochaFile=../../reports/tests/$(dirname).xml || true
poetry run pytest
Empty file added sandbox/__init__.py
Empty file.
133 changes: 0 additions & 133 deletions sandbox/app.js

This file was deleted.

7 changes: 7 additions & 0 deletions sandbox/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from flask import Flask

app = Flask(__name__)

@app.route("/hello_world", methods=["GET"])
def hello_world() -> dict:
return {"message": "Hello, World!"}
67 changes: 0 additions & 67 deletions sandbox/app.spec.js

This file was deleted.

68 changes: 0 additions & 68 deletions sandbox/handlers.js

This file was deleted.

32 changes: 0 additions & 32 deletions sandbox/index.js

This file was deleted.

5 changes: 0 additions & 5 deletions sandbox/package-lock.json

This file was deleted.

Loading

0 comments on commit 3bcc887

Please sign in to comment.