sucodelarangela / reading-list-graphql

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Reading List | GraphQl / Apollo / React

Read it in English

Aplicação com React para prática pessoal de GraphQL e Apollo Client.

⚙️ Como usar

  1. Crie um banco de dados no MongoDb Atlas;

  2. 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/sucodelarangela/reading-list-graphql.git
  1. Acesse a pasta do projeto com seu terminal;

  2. Rode o comando npm install ou yarn install para instalar as dependências (você precisa ter o Node.js instalado);

  3. Crie um arquivo .env na pasta server. Neste arquivo, crie duas variáveis DBUSER e DBPASS e atribua a elas seu nome de usuário e a senha do seu banco de dados do MongoDb Atlas criado no passo 1, respectivamente.

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

  1. Após a correta configuração acima, acesse a pasta server e rode o back-end com o comando npm start ou yarn start. Você deve receber a seguinte mensagem de confirmação:
Now listening for requests on port 4000
Connected to database
  1. Depois, abra outra instância do seu terminal e acesse a pasta client. Rode o comando npm run dev ou yarn dev para ter acesso ao front-end da aplicação. Você deve receber a seguinte mensagem de confirmação:
yarn run v1.22.19
$ vite

  VITE v4.0.4  ready in 736 ms

  ➜  Local:   http://127.0.0.1:5173/
  ➜  Network: use --host to expose
  ➜  press h to show help
  1. Acesse o endereço Local acima no seu navegador para usar a lista de leitura.

English version

🔎 Overview

React app for personal practices of GraphQL and Apollo Client.

⚙️ How to use it

  1. Create a database in MongoDb Atlas;

  2. 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/sucodelarangela/reading-list-graphql.git
  1. Access the project root folder on your terminal;

  2. Run npm install or yarn install to install all project dependencies (you must have Node.js installed);

  3. Create a .env file in the server folder. In this file, create two variables DBUSER and DBPASS and set their values with the user name and password for the MongoDb Atlas database created on step 1, respectively.

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

  1. After the correct setup above, access the server folder and run npm start or yarn start on yout terminal to start the back-end. You should receive the following message:
Now listening for requests on port 4000
Connected to database
  1. Then, open a new instance of your terminal and access the clientfolder. Run npm run dev or yarn dev to have access to the front-end. You should receive the following message:

  2. Open the Local url above on your browser to use the reading list.


Developed with 🧡 by @sucodelarangela

About


Languages

Language:JavaScript 86.2%Language:CSS 9.1%Language:HTML 4.7%