Files
romm/DEVELOPER-SETUP.md
2023-05-11 00:34:28 +02:00

1.2 KiB

Create the mock structure with at least one rom

mkdir -p romm_mock/library/roms/switch
touch romm_mock/library/roms/switch/metroid.xci
mkdir -p romm_mock/resources
touch romm_mock/config.yml

Setting up the backend

Copy env.template to .env and fill the variables

cp env.template .env

Install python dependencies

You'll need poetry installed

https://python-poetry.org/docs/#installing-with-the-official-installer

Then initialize the virtual environment and install the dependencies

poetry shell
# Fix disable parallel installation stuck: $> poetry config experimental.new-installer false
# Fix Loading macOS stuck: $> export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring
poetry install

Spin up mariadb in docker

docker-compose up -d

Run the migrations

cd backend
alembic upgrade head

And finally run the backend

python main.py

Setting up the frontend

Install node.js dependencies

cd frontend
npm install
mkdir assets/romm
ln -s ../../../romm_mock/library assets/romm/library
ln -s ../../../romm_mock/resources assets/romm/resources

Run the frontend

npm run dev