Skip to content

API of the Pet Journal platform that helps you take care of your pet.

License

Notifications You must be signed in to change notification settings

PetJournal/petjournal.api

Repository files navigation

Pet Journal

Read it in English

API da plataforma Pet Journal que te ajuda a cuidar do teu pet.

⚙️ Como usar

  1. Faça o download deste repositório através do botão verde Code no topo da página e, em seguida, clicando em Download ZIP. Ou, se preferir, através do terminal (Git Bash, Powershell, etc.), use o comando:
git clone https://github.com/PetJournal/petjournal.api.git
  1. Crie uma cópia do arquivo .env.example com o nome .env. Neste arquivo, substitua os valores das variáveis pela porta de sua preferência para o localhost, além do nome de usuário e senha do seu banco de dados PostgreSQL.

A aplicação só funcionará com esses dados corretamente inseridos no arquivo .env.

  1. Inicie o Docker em sua máquina;

  2. Para iniciar o banco de dados PostgreSQL, rode o comando:

docker compose -f docker-compose.dev.yml up -d
  1. Garanta que o Node.js está instalado em sua máquina e então habilite o gerenciador de pacotes yarn usando o comando corepack enable;

  2. Acesse a pasta do projeto com seu terminal;

  3. Rode o comando yarn para instalar as dependências do projeto;

  4. Após a correta configuração acima, rode a aplicação com o comando yarn dev. Você deve receber a seguinte mensagem de confirmação:

Server running at http://localhost:<porta>
  1. Para visualizar a documentação com as rotas disponíveis, acesse localhost:<porta>/api/docs.

🔼 Voltar ao topo


English version

🔎 Overview

API of the Pet Journal platform that helps you take care of your pet.

⚙️ How to use it

  1. Download this repository by clicking the green Code button on top of the page and then clicking Download ZIP option. Or use the following command on your terminal (Git Bash, Powershell, etc.):
git clone https://github.com/PetJournal/petjournal.api.git
  1. Create a copy of the file .env.example with the name .env. In this file, replace the values for the variables with your favorite localhost port, the user name and password for the PostgreSQL database.

The app will only work properly if these data are correctly set in .env file.

  1. Start Docker on your machine;

  2. To start the PostgreSQL database, run the command:

docker compose -f docker-compose.dev.yml up -d
  1. Ensure that Node.js is installed on your machine and then enable the yarn package manager using the corepack enable command;

  2. Access the project root folder on your terminal;

  3. Run the yarn command to install the project dependencies;

  4. To start the application, run yarn dev on your terminal. You should receive the following message:

Server running at http://localhost:<port>}
  1. To view the documentation with the available routes, access localhost:<port>/api/docs.

🔼 Back to top


About

API of the Pet Journal platform that helps you take care of your pet.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages