diff --git a/ecma/function-sum/jean.carlos/function-sum.js b/ecma/function-sum/jean.carlos/function-sum.js index 2e6e579..b65353b 100644 --- a/ecma/function-sum/jean.carlos/function-sum.js +++ b/ecma/function-sum/jean.carlos/function-sum.js @@ -1,8 +1,10 @@ const n1 = 1; const n2 = 2; +let soma = require("./sum") function soma(m1, m2){ return m1+m2 } + console.log(soma(n1, n2)) \ No newline at end of file diff --git a/ecma/function-sum/jean.carlos/sum.js b/ecma/function-sum/jean.carlos/sum.js new file mode 100644 index 0000000..a233cac --- /dev/null +++ b/ecma/function-sum/jean.carlos/sum.js @@ -0,0 +1,5 @@ +function soma(m1, m2){ + return m1+m2 +} + +module.exports = soma \ No newline at end of file diff --git a/web/node-hello-simple/jean.carlos/app.js b/web/node-hello-simple/jean.carlos/app.js new file mode 100644 index 0000000..0e7c959 --- /dev/null +++ b/web/node-hello-simple/jean.carlos/app.js @@ -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}/`); + }); \ No newline at end of file