/cloud

Primary LanguageTypeScript

Aiven cloud listing proxy and frontend

Consists of Python3 Flask based API and a React frontend.

Setup

Python3 and Node required. TODO: which version?

With Python3 it is recommended to use a virtual environment. Create one by running python3 -m venv venv. This venv can be loaded by running source venv/bin/activate in the file containing the virtual environment folder. API requirements are stored in src/api/requirements.txt. Install dependencies inside the virtual environment by entering src/api and running pip install -r requirements.txt.

With Node it is recommended to use yarn for dependency management. Install the dependencies by entering src/ui and running yarn.

Local development

Running the backend:

  • Enter the Python virtual environment

  • Launch the Flask server by calling python3 main.py in src/api

  • Will run in http://localhost:5000/v1/api by default

  • TODO: linter

Running the frontend:

  • Launch the React app by calling yarn start in src/ui

  • Will run in http://localhost:3000 by default

  • src/ui uses Prettier for linting

Testing

TODO: set up API tests

TODO: set up frontend tests

Deployment

TODO: set up Dockerfile for simple local and cloud deployments

TODO: use a WSGI server for Flask