#488 [FEAT]: Variáveis de ambiente centralizadas e adicionado arquivo .env-example #489
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
NÃO REMOVER BRANCH 488 ANTES DE AVALIAR #494
Esse pull request inclui várias alterações para refatorar a base de código, removendo a importação
baseUrl
e substituindo-a pela variável de ambienteREACT_APP_API_URL
. Além disso, foi adicionado um arquivo.env
de exemplo.Atualizações de configuração:
.env-example
: Adição de variáveis de ambiente para sal de bcrypt, URL de base da API e porta do aplicativo.Refatoração de código para usar variáveis de ambiente:
src/components/CreateProcotolProperties.jsx
: Substituição debaseUrl
porprocess.env.REACT_APP_API_URL
nas chamadas de API. [1] [2]src/components/Gallery.jsx
: URLs de origem de imagem atualizados para usarprocess.env.REACT_APP_API_URL
.src/components/GalleryModal.jsx
: URLs de origem de imagem atualizados para usarprocess.env.REACT_APP_API_URL
.src/components/Sidebar.jsx
: URL da imagem do perfil atualizado para usarprocess.env.REACT_APP_API_URL
.src/components/inputs/answers/LocationInput.jsx
:Substituição debaseUrl
porprocess.env.REACT_APP_API_URL
nas chamadas de API. [1] [2]src/contexts/AuthContext.js
: Substituição debaseUrl
porprocess.env.REACT_APP_API_URL
nas chamadas de API.src/pages/AnswerPage.jsx
: Substituição debaseUrl
porprocess.env.REACT_APP_API_URL
nas chamadas de API.src/pages/ApplicationPage.jsx
: Substituição debaseUrl
porprocess.env.REACT_APP_API_URL
nas chamadas de API. [1] [2] [3]src/pages/ApplicationsPage.jsx
: Substituição debaseUrl
porprocess.env.REACT_APP_API_URL
nas chamadas de API. [1] [2]src/pages/CreateApplicationPage.jsx
: Substituição debaseUrl
porprocess.env.REACT_APP_API_URL
nas chamadas de API. [1] [2] [3]Removida a importação
baseUrl
não utilizada:src/contexts/RouteContext.js
: Excluímos o arquivoRouteContext.js
, pois ele não é mais necessário.Removed redundant scripts:
package.json
: Removido o scriptdocker-back
.