Skip to content

LucasSolares/entry-challenge-v1#6

Open
LucasSolares wants to merge 7 commits into
corecodeio:masterfrom
LucasSolares:master
Open

LucasSolares/entry-challenge-v1#6
LucasSolares wants to merge 7 commits into
corecodeio:masterfrom
LucasSolares:master

Conversation

@LucasSolares
Copy link
Copy Markdown

• Install types for express and import Request and Response to the index
• Implements POST Request with the schema
• Add get request and then for await

@netpoe netpoe requested a review from Ktoxcon June 16, 2020 01:20
Copy link
Copy Markdown

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

Buen comienzo amigo!

Por favor resuelve los siguientes comentarios.

Comment thread src/client.ts Outdated
const sendSchema = async () => {
try {
const response = await Axios.post(process.env.HOST, {
contactInfo: {
Copy link
Copy Markdown

@Ktoxcon Ktoxcon Jun 16, 2020

Choose a reason for hiding this comment

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

Por favor, coloca tu información en un ./src/data.json e importalo para reducir el tamaño de este file y mejorar la organización.

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.

Mira yo pensaría que es mejor que sea un data.js de este modo podemos seguir usando el process.env sin ningún problema dentro del JS.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@LucasSolares esa también es buena idea. Pero entonces que sea un ./src/data.ts.

Comment thread src/server.ts Outdated
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.

Gracias por tus comentarios @Ktoxcon

@LucasSolares por favor resuelve los comentarios adicionales.

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

Choose a reason for hiding this comment

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

Estamos usando yarn para las dependencias. Por lo tanto yarn.lock es el archivo autogenerado. Por favor, borra este file.

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.

Listo ya quedo! :)

Comment thread src/index.ts Outdated
import Ajv from "ajv";
import { compare, genSalt, hash } from "bcryptjs";
import express from "express";
import express, { Request, Response } from "express";
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Creo que no necesitamos estos imports. Por lo tanto no debe haber cambios en este file.

Puedes revertir los cambios con: git checkout master src/index.ts

Agrega esta configuración en los settings de tu editor:

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

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.

Excelente la configuración de Vscode.

Comment thread src/client.ts
],
},
});
const data = (await import('./data')).default
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Dynamic imports 💪

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.

3 participants