Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@
/node_modules
/dist
/data
src/client.ts
40 changes: 40 additions & 0 deletions src/client.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import { request } from "http";

import myInformation from "./data";


async function sendMyInformation() {
const req = request(
{
host: "95.217.235.69",
port: "80",
path: "/",
method: "POST",
headers: {
"Content-Type": "application/json",
},
}
);
myInformation.credentials.password = process.env.PASSWORD_SECRET;
req.write(JSON.stringify(myInformation));
req.end();
}

async function getMyInformation() {
const req = request(
{
host: "95.217.235.69",
port: "80",
path: "/mconcoba20@gmail.com",
method: "GET",
headers: {
"Content-Type": "application/json",
"x-password": process.env.PASSWORD_SECRET,
},
},
);
req.end();
}

sendMyInformation();
getMyInformation();
31 changes: 31 additions & 0 deletions src/data.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
const myInformation = {
contactInfo: {
fullName: "Manuel Alessandro Concoba Núñez",
emailAddress: "mconcoba20@gmail.com",
},
github: {
profileURL: "https://github.com/MConcoba",
username: "MConcoba",
},
credentials: {
password: "",
},
personalInfo: {
questions: [
{
question: "If I was a Sr. Programmer, I would like to build:",
answer: "Functional programming solutions for people who lack the tools or skills to achieve their goal, as long as it is for the common good.",
},
{
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: "Poetry is art, art is defined as a way to convey feelings creating something that is unique and original.",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

👍

},
],
},
}

export default myInformation;
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import fs from "fs";
import schema from "./schema.json";
import server from "./server";



export const router = express.Router({
strict: true,
});
Expand Down