Enables using yarn >= 2
corepack enable
corepack prepare yarn@stable --activate
Boots a local mongodb instance with minimum configuration.
docker-compose up -d database
The .env
file is very important in the setup process since it wires
everything configuration-wise.
In both packages' root there's a env.default
which pack a template for a
possible configuration, although there are some changes needed in order to make
it work, specially when running in docker containers.
-
cp packages/<package-name>/.env.default packages/<package-name>/.{env,env.production}
-
Change the hostnames, such as database and cors to meet the deployed server, such as hostnames:
DATABASE_URL=mongodb://127.0.0.1:27017/database
toDATABASE_URL=mongodb://database:27017/database
CLIENT_URL=http://localhost:5173
toCLIENT_URL=http://localhost:8080
Install all projects dependencies.
yarn
yarn app:dev
or
yarn workspace @realmdb/app dev
yarn api:dev
or
yarn workspace @realmdb/api dev
docker-compose up -d
The app will be available in http://localhost:8080