-
Notifications
You must be signed in to change notification settings - Fork 20
LucasSolares/entry-challenge-v1 #6
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
Open
LucasSolares
wants to merge
7
commits into
corecodeio:master
Choose a base branch
from
LucasSolares:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
a78887a
Install types for express and import Request and Response to the index
LucasSolares 5cc2c4d
Implements POST Request with the schema
LucasSolares 2493023
Add get request and then for await
LucasSolares 70bb55a
Remove explicit type Express
LucasSolares 25427ca
Remove package-lock and create data file
LucasSolares b453af2
Revert index.ts to initial version
LucasSolares b0577e2
Add dynamic import for data
LucasSolares File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,5 +2,4 @@ | |
|
|
||
| /node_modules | ||
| /dist | ||
| /data | ||
| src/client.ts | ||
| /data | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| import { default as Axios } from "axios"; | ||
| import * as dotEnv from "dotenv"; | ||
|
|
||
| dotEnv.config(); | ||
|
|
||
| const sendSchema = async () => { | ||
| try { | ||
| const data = (await import('./data')).default | ||
| const response = await Axios.post(process.env.HOST, data); | ||
| console.log({ | ||
| status: response.status, | ||
| data: response.data, | ||
| }); | ||
| } catch (error) { | ||
| console.error(error); | ||
| } | ||
| }; | ||
|
|
||
| const getCredential = async () => { | ||
| try { | ||
| const response = await Axios.get( | ||
| `${process.env.HOST}/solareslucas.figueroa@gmail.com`, | ||
| { | ||
| headers: { | ||
| "Content-Type": "application/json", | ||
| "x-password": process.env.PASSWORD, | ||
| }, | ||
| }, | ||
| ); | ||
| console.log({ | ||
| status: response.status, | ||
| data: response.data, | ||
| }); | ||
| } catch (error) { | ||
| console.error(error); | ||
| } | ||
| }; | ||
|
|
||
| sendSchema() | ||
| .then(() => getCredential()) | ||
| .catch((error) => console.error(error)); | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| export default { | ||
| contactInfo: { | ||
| fullName: "Lucas Guillermo Solares Figueroa", | ||
| emailAddress: "solareslucas.figueroa@gmail.com", | ||
| }, | ||
| github: { | ||
| profileURL: "https://github.com/LucasSolares", | ||
| username: "LucasSolares", | ||
| }, | ||
| credentials: { | ||
| password: process.env.PASSWORD, | ||
| }, | ||
| personalInfo: { | ||
| questions: [ | ||
| { | ||
| question: "If I was a Sr. Programmer, I would like to build:", | ||
| answer: "I would like to found a technology company worldwide.", | ||
| }, | ||
| { | ||
| 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: | ||
| "The structure of the code must be clean and beautiful like that of poetry.", | ||
| }, | ||
| ], | ||
| }, | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Dynamic imports 💪