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

AULA SEXTA 13 #122

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
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
2 changes: 2 additions & 0 deletions ecma/function-sum/jean.carlos/function-sum.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
const n1 = 1;
const n2 = 2;
let soma = require("./sum")

function soma(m1, m2){
return m1+m2
}
Comment on lines 5 to 7
Copy link
Member

Choose a reason for hiding this comment

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

remover a function sum daqui, pois ela será importada do ./sum



console.log(soma(n1, n2))
5 changes: 5 additions & 0 deletions ecma/function-sum/jean.carlos/sum.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
function soma(m1, m2){
return m1+m2
}

module.exports = soma
13 changes: 13 additions & 0 deletions web/node-hello-simple/jean.carlos/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const http = require ("http");

const hostname = "127.0.0.1";
const port = 3000;

const server = http.createServer((req, res) => {
res.statusCode = 200;
res.setHeader("Content-Type", "tex/plain");
res.end("Hello World");
});
server.listen(port, hostname, () => {
console.log(`Server running at http://${hostname}:${port}/`);
});