Skip to content

JonathanL1ma/entry-challenge#7

Open
JonathanL1ma wants to merge 3 commits into
corecodeio:masterfrom
JonathanL1ma:master
Open

JonathanL1ma/entry-challenge#7
JonathanL1ma wants to merge 3 commits into
corecodeio:masterfrom
JonathanL1ma:master

Conversation

@JonathanL1ma
Copy link
Copy Markdown

  • Create POST request

  • Create GET request

  • Entry Challenge Solved

@netpoe netpoe self-assigned this Jun 16, 2020
Copy link
Copy Markdown

@netpoe netpoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JonathanL1ma buen comienzo.

por favor resuelve los comentarios.

Comment thread package-lock.json Outdated
@@ -0,0 +1,1206 @@
{
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Por favor remueve este file. Estamos usando yarn para instalar dependencias. yarn.lock es el registro de yarn por lo que package-lock.json es innecesario.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ya eliminé el archivo package-lock.json e instalé las librerías con yarn.

Comment thread package.json
"ajv": "^6.12.2",
"axios": "^0.19.2",
"bcryptjs": "^2.4.3",
"dotenv": "^8.2.0",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Necesitamos dotenv?
Puedes intentar desinstalar la dependencia y utilizar process.env a ver si funciona sin esta dependencia?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Al momento de quitar la librería de dotenv los valores de las variables eran undefined, cuando se utiliza la librería de dotenv ya trae los valores adecuados.

Comment thread src/client.ts Outdated
Comment on lines +8 to +36
const response = await axios.post("http://95.217.235.69/", {
contactInfo: {
fullName: "Jonathan Alexander Lima Ruiz",
emailAddress: process.env.EMAIL,
},
github: {
profileURL: "https://github.com/JonathanL1ma",
username: "JonathanL1ma",
},
credentials: {
password: process.env.PASSWORD,
},
personalInfo: {
questions: [
{
question: "If I was a Sr. Programmer, I would like to build:",
answer: "A company that is dedicated to creating multiplatform applications which help people to solve the different problems that arise in their day to day.",
},
{
question: "Por favor indica el URL que me lleva a la línea de código de la definición de React.useEffect",
answer: "https://github.com/facebook/react/blob/655affa302437208e6f03c9ca6d170ea1707ace3/packages/react-reconciler/src/ReactFiberHooks.new.js#L1878",
},
{
question: "code is poetry, because:",
answer: "Because there are thousands of ways to write code and everyone does it in their own way.",
},
],
},
});
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Movamos este bloque de información a ./src/data.ts por favor. Así mantenemos client.s más pequeño y ordenado.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ya sé creó el archivo de data.ts.

Comment thread src/client.ts Outdated
try {
const response = await axios.post("http://95.217.235.69/", data);

console.log(response.data);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hay que procurar no dejar console.logs.
Vamos a aprender a utilizar herramientas de debugging para no utilizar console.logs 💪

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ya quité los console.log.

Comment thread src/client.ts Outdated
}
});

console.log(getCredentials.data);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants