Setup Poetry
in the virtual environment:
mkdir backend
cd backend
export VENV_PATH=venv
python3 -m venv $VENV_PATH
$VENV_PATH/bin/pip install -U pip setuptools
$VENV_PATH/bin/pip install poetry
Create python project using Poetry
:
poetry new app
cd app
# add basic dependencies
poetry add fastapi uvicorn websockets
# add dev dependencies
poetry add --group dev black flake8 pytest
See more info about Poetry
basic usage here.
Run the server:
uvicorn app.main:app --reload
- Integrate Broadcaster
Create Next.js
project:
npx create-next-app@latest --typescript --experimental-app frontend
Run the server:
cd frontend
npm run dev
# basic
npm install @mui/material @mui/styled-engine-sc styled-components
# icons
npm install @mui/icons-material
npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p
npm i nanoid
npm i react-draggable
It is necessary to export backend URL in the build.env
file in .gitlab-ci-front.yml
. This is necessary for the frontend to be able to connect to the backend.