Skip to content

How to run

Cátia Barroco edited this page Apr 3, 2023 · 30 revisions
Split

🚀 How to run?

You can run this project in 3 different ways:

On the topics below you can find more details about the ways to run this project.

Docker

Docker is a powerful tool and in some cases very useful. In this section, you can find how to run this project fully in Docker.

You can also use Colima instead of docker desktop. Follow the instructions on its readme page to install it.


Traditional Way

The "traditional" way runs the project using your terminal, opening 2 terminals and running with yarn dev/npm run dev in the frontend and yarn start:dev/npm run start:dev in the backend, but for this, you need to do some things first:

  1. Verify if you follow the requirements to run this project;

  2. Duplicate the .env.example file and remove .example prefix on each application folder (backend and frontend);

  3. Verify if you have Docker installed and running;

  4. Within the project root folder, create the database containers executing the following commands:

    1. Run this command to give execution permissions: chmod +x database/rs-init.sh;
    2. docker-compose up mongo mongo2 redis azurite -d or docker compose up -d mongo mongo2 redis azurite
      • This file is used to init the database.
    3. After that run: docker exec mongo /scripts/rs-init.sh.
  5. Now you need to install all the dependencies, for that run the following command on the project root folder and in each application folder (frontend and backend):

    • yarn: if you use Yarn;
    • npm i/npm install: if you use NPM
  6. Now please verify if you have 4 Docker containers: Mongo and Mongo2 and Redis and Azurite;

    DB Containers
  7. if you have the containers you only need to run (for each folder):

    • On Backend (backend/):
      • yarn start:dev(using Yarn);
      • npm run start:dev (using NPM).
    • On Frontend (frontend/):
      • yarn dev (using Yarn);
      • npm run dev (using NPM).

Storybook

In order to run the storybook locally you should take the following steps:

  1. The dependencies must be installed
  2. In the frontend folder, run rpm run storybook and it will be available at port 6006
Clone this wiki locally