Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

areyes2018391(fixed) #5

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

Conversation

areyes107
Copy link

No description provided.

@Ktoxcon Ktoxcon self-assigned this Jun 16, 2020
Copy link

@Ktoxcon Ktoxcon left a comment

Choose a reason for hiding this comment

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

Muy Buen comienzo @areyes2018391

Por favor resuelve los siguientes comentarios.

@@ -1,6 +1,3 @@
.env

/node_modules
/dist
Copy link

Choose a reason for hiding this comment

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

Solo una única modificación era necesaria en este archivo, por favor devuelve su estado original al archivo y realizala

Copy link
Author

Choose a reason for hiding this comment

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

Ya he modificado el .gitignore

src/client.ts Outdated
method: 'GET',
headers: {
'Content-Type': 'application/json',
"x-password": "Reyesg2000"
Copy link

Choose a reason for hiding this comment

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

Busca una manera de agregar la contraseña sin ponerla directamente en el código (hardcoded).

Copy link
Author

Choose a reason for hiding this comment

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

La contraseña ha sido removida y ahora uso variables de entorno

src/client.ts Outdated
},
response => {
console.log(response.statusCode);
response.pipe(createWriteStream('./key.txt'))
Copy link

Choose a reason for hiding this comment

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

No es necesario que guardes este file.

Copy link
Author

Choose a reason for hiding this comment

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

Ya he corregido este file

src/client.ts Outdated



const data = {
Copy link

Choose a reason for hiding this comment

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

Por favor mueve este bloque a un ./src/data.json o ./src/data.ts , e importalo para reducir el tamaño de este file y mejorar la organización.

Copy link
Author

Choose a reason for hiding this comment

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

He creado un archivo data.ts y he movido este bloque

Copy link

Choose a reason for hiding this comment

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

@Ktoxcon cuando refieras nombres de archivos, procura marcarlos como ./src/data.json, ./src/data.ts.

src/client.ts Outdated
{
question:
"Por favor indica el URL que me lleva a la línea de código de la definición de React.useEffect",
answer: "Respuesta:https://github.com/facebook/react/blob/master/packages/react/src/ReactHooks.js#L104",
Copy link

Choose a reason for hiding this comment

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

Estas muy cerca!
Pero aquí están usando un dispatcher, que es como un adminstrador de las acciones.
Por ejemplo, useEffect acepta un parámetro [] que detecta el cambio del contenido. En dónde podría estar esta lógica?

Copy link
Author

Choose a reason for hiding this comment

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

He encontado el link y he subido los cambios

src/index.ts Outdated
@@ -90,3 +92,6 @@ server.post("/", async (req: Request, res: Response) => {
server.listen("80", () => {
console.log("listening");
});

sendInformation();
Copy link

Choose a reason for hiding this comment

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

No es necesario que modifiques este archivo, llama a tus funciones desde ./src/client.ts

Copy link
Author

Choose a reason for hiding this comment

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

El index ha sido regresado su estado original

Copy link

@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.

Muy cerca.
Gracias @Ktoxcon por las observaciones.

@areyes2018391 por favor instala esta extensión en tu editor: https://github.com/prettier/prettier-vscode

También añade esto a settings,.json de tu editor:

"editor.codeActionsOnSave": {
    "source.organizeImports": true
  },

src/index.ts Outdated
@@ -1,6 +1,6 @@
import Ajv from "ajv";
import { compare, genSalt, hash } from "bcryptjs";
import express from "express";
import express, {Request, Response} from "express";
Copy link

Choose a reason for hiding this comment

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

No es necesario modificar ./src/index.ts.
Ejecuta este comando para devolverlo al estado original: git checkout master src/index.ts

Copy link
Author

Choose a reason for hiding this comment

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

Ya lo he hecho, gracias por la observación @netpoe

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.

4 participants