-
Notifications
You must be signed in to change notification settings - Fork 21
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
base: master
Are you sure you want to change the base?
Conversation
Key file was deleted
Package-lock.jason was deleted
There was a problem hiding this 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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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')) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 = { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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(); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this 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"; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
No description provided.