diff --git a/.gitignore b/.gitignore
index 4d29575..8e2468c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -21,3 +21,4 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*
+*.env
diff --git a/package-lock.json b/package-lock.json
index 9550f7e..f28a1f6 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -11,6 +11,7 @@
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^7.1.2",
+ "dotenv": "^16.0.1",
"html-react-parser": "^3.0.1",
"prop-types": "^15.8.1",
"react": "^16.13.1",
@@ -6125,11 +6126,11 @@
}
},
"node_modules/dotenv": {
- "version": "8.2.0",
- "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz",
- "integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw==",
+ "version": "16.0.1",
+ "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.1.tgz",
+ "integrity": "sha512-1K6hR6wtk2FviQ4kEiSjFiH5rpzEVi8WW0x96aztHVMhEspNpc4DVOUTEHtEva5VThQ8IaBX1Pe4gSzpVVUsKQ==",
"engines": {
- "node": ">=8"
+ "node": ">=12"
}
},
"node_modules/dotenv-expand": {
@@ -13855,6 +13856,14 @@
}
}
},
+ "node_modules/react-scripts/node_modules/dotenv": {
+ "version": "8.2.0",
+ "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz",
+ "integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw==",
+ "engines": {
+ "node": ">=8"
+ }
+ },
"node_modules/read-pkg": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz",
@@ -22296,9 +22305,9 @@
}
},
"dotenv": {
- "version": "8.2.0",
- "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz",
- "integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw=="
+ "version": "16.0.1",
+ "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.1.tgz",
+ "integrity": "sha512-1K6hR6wtk2FviQ4kEiSjFiH5rpzEVi8WW0x96aztHVMhEspNpc4DVOUTEHtEva5VThQ8IaBX1Pe4gSzpVVUsKQ=="
},
"dotenv-expand": {
"version": "5.1.0",
@@ -28384,6 +28393,13 @@
"webpack-dev-server": "3.11.0",
"webpack-manifest-plugin": "2.2.0",
"workbox-webpack-plugin": "4.3.1"
+ },
+ "dependencies": {
+ "dotenv": {
+ "version": "8.2.0",
+ "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz",
+ "integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw=="
+ }
}
},
"read-pkg": {
diff --git a/package.json b/package.json
index af0db3f..c2d80c3 100644
--- a/package.json
+++ b/package.json
@@ -6,6 +6,7 @@
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^7.1.2",
+ "dotenv": "^16.0.1",
"html-react-parser": "^3.0.1",
"prop-types": "^15.8.1",
"react": "^16.13.1",
@@ -37,5 +38,6 @@
},
"devDependencies": {
"react-error-overlay": "^6.0.9"
- }
+ },
+ "build_staging": "PUBLIC_URL=https://www.wribeiiro.com react-scripts build"
}
diff --git a/public/data/en.json b/public/data/en.json
index 86bac81..acba604 100644
--- a/public/data/en.json
+++ b/public/data/en.json
@@ -25,7 +25,7 @@
"info": {
"avatar": "https://avatars.githubusercontent.com/u/20648572?s=460&u=47a55caca6dbc315d1932aaf77eefa20b2002baf&v=4",
"firstText": "Wellisson Ribeiro",
- "secondText": "Fullstack Developer ~ ",
+ "secondText": "Backend Developer ~ ",
"thirdText": "English Student",
"languageOptions": [
{
@@ -47,13 +47,13 @@
"banner": {
"background": "https://cdna.artstation.com/p/assets/images/images/036/822/576/original/karina-formanova-cover-final.gif?1618727960",
"firstText": "Wellisson Ribeiro",
- "secondText": "Fullstack Developer"
+ "secondText": "Backend Developer"
},
"terminal": {
"sudoCommand": "sudo --help aboutme",
"userRoot": "root@wribeiiro:~$ ",
"userRootBlink": "root@wribeiiro:/usr/aboutme/$ _",
- "aboutComplete": "root@wribeiiro:~$ sudo --help aboutme
Brazilian 🇧🇷 {myyear}y, christian ✝️, married 👰, and father of two kids 👶👶.
Gratuated in Analysis and Systems Development 🎓 and now, i am an english student 🇺🇸.
I've been working as Developer since 2016 with different technologies, but currently
my main stack is Back-end with PHP 🐘, Laravel and MySQL. Currently i work as a Software Engineer 👨💻 at SoftExpert.
All packages are up to date
"
+ "aboutComplete": "root@wribeiiro:~$ sudo --help aboutme
Brazilian 🇧🇷 {myyear}y, christian ✝️️, married 👰♀️, and father of two kids 👶👶.
In the last few months I became an English student 🇺🇸.
I have almost 6 years of experience in the development area, I've used several different tecnologies and languages,
also i worked as fullstack most of this time, but what I really like is the backend.
Currently I'm Software Engineer at SoftExpert. I'm passionate about PHP, Laravel 🐘 and Databases 🐬.
All packages are up to date
"
}
}
},
diff --git a/public/data/pt-br.json b/public/data/pt-br.json
index 1304a49..70ba64a 100644
--- a/public/data/pt-br.json
+++ b/public/data/pt-br.json
@@ -25,7 +25,7 @@
"info": {
"avatar": "https://avatars.githubusercontent.com/u/20648572?s=460&u=47a55caca6dbc315d1932aaf77eefa20b2002baf&v=4",
"firstText": "Wellisson Ribeiro",
- "secondText": "Desenvolvedor Fullstack ~ ",
+ "secondText": "Desenvolvedor Backend ~ ",
"thirdText": "Estudande de Inglês",
"languageOptions": [
{
@@ -47,13 +47,13 @@
"banner": {
"background": "https://cdna.artstation.com/p/assets/images/images/036/822/576/original/karina-formanova-cover-final.gif?1618727960",
"firstText": "Wellisson Ribeiro",
- "secondText": "Desenvolvedor Fullstack"
+ "secondText": "Desenvolvedor Backend"
},
"terminal": {
"sudoCommand": "sudo --ajuda sobremim",
"userRoot": "root@wribeiiro:~$ ",
"userRootBlink": "root@wribeiiro:/usr/aboutme/$ _",
- "aboutComplete": "root@wribeiiro:~$ sudo --ajuda sobremim
Brasileiro 🇧🇷 {myyear}, cristão ✝️, casado 👰, e pai de duas 👶👶.
Graduado em Análise e Desenvolvimento de Sistemas 🎓 e agora, sou um estudante de Inglês 🇺🇸.
Tenho trabalhado como Desenvolvedor desde 2016 com diferentes tegnologias, mas atualmente
minha stack principal é Back-end com PHP 🐘, Laravel e MySQL. Atualmente eu trabalho como Engenheiro de Software 👨💻
na SoftExpert.
Todos os pacotes estão atualizados.
"
+ "aboutComplete": "root@wribeiiro:~$ sudo --ajuda sobremim
Brasileiro 🇧🇷 {myyear}, cristão ✝️, casado 👰, e pai de duas 👶👶.
Nos últimos meses me tornei estudante de inglês 🇺🇸.
Tenho quase 6 anos de experiência na área de desenvolvimento, já utilizei diversas tecnologias e linguagens diferentes,
também trabalhei como fullstack na maior parte do tempo, mas o que gosto mesmo é do backend.
Atualmente sou Engenheiro de Software na SoftExpert. Sou apaixonado por PHP, Laravel 🐘 e Bancos de Dados 🐬.
Todos os pacotes estão atualizados.
"
}
}
},
diff --git a/src/App.jsx b/src/App.jsx
index 78c05d5..f7156f1 100644
--- a/src/App.jsx
+++ b/src/App.jsx
@@ -33,7 +33,11 @@ export default function App() {
const fetchTranslation = async () => {
let translation = localStorage.getItem("wribeiiro-translation") ?? 'en';
- await fetch(`http://localhost:3000/data/${translation}.json`, {
+ const endpoint = process.env.NODE_ENV === 'development'
+ ? process.env.REACT_APP_DEVELOPMENT_DOMAIN
+ : process.env.REACT_APP_PRODUCTION_DOMAIN;
+
+ await fetch(`${endpoint}/data/${translation}.json`, {
method: "GET",
})
.then((response) => response.json())