Upgrade to Pro — share decks privately, control downloads, hide ads and more …

node.js in java OB

node.js in java OB

Java/Go OB会で話したNode.jsの話です。

Yosuke Furukawa

July 22, 2017
Tweet

More Decks by Yosuke Furukawa

Other Decks in Programming

Transcript

  1. HTTP Server 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', 'text/plain'); res.end('Hello World\n'); }); server.listen(port, hostname, () => { console.log(`Server running at http://${hostname}:${port}/`); }); ͜Ε͚ͩͰಈ͘खܰ͞
  2. IoT

  3. Node.js in brief • Server-Side JavaScript • Evented, Non-Blocking I/O

    Similar to EventMachine • Built on Google’s V8
  4. Node.js in brief • Server-Side JavaScript • Evented, Non-Blocking I/O

    Similar to EventMachine • Built on Google’s V8 8IZ/PEFDIPPTFUIFTF BSDIJUFDUVSF
  5. "QBDIFWT/HJOY "QBDIF /HJOY XPSLFS XPSLFS XPSLFS XPSLFS XPSLFS XPSLFS XPSLFS

    XPSLFS XPSLFS ϦΫΤετͷ౓ʹXPSLFSεϨου͕ىಈ ͠ɺϝϞϦ͕ඡഭ͞ΕΔڪΕɺ·ͨεϨου ͕ଟ͍ͱεϨου੾Γସ͑΋ίετߴ͍
  6. "QBDIFWT/HJOY "QBDIF /HJOY XPSLFS XPSLFS XPSLFS XPSLFS XPSLFS XPSLFS XPSLFS

    XPSLFS XPSLFS γϯάϧεϨουͳͷͰίωΫγϣϯ͕ ͨ͘͞Μ͋ͬͯ΋XPSLFS͸ىಈ͠ͳ͍ Ϧιʔε͕ޮ཰త
  7. function hoge() { console.log(“Hello Hello”); } function fuga() { //

    fugafufa console.log(“World World”); } +BWB4DSJQU ͜Ε·Ͱ ߏจղੳ > Hello Hello > World World ࣮ߦ
  8. function hoge() { console.log(“Hello Hello”); } function fuga() { //

    fugafufa console.log(“World World”); } +BWB4DSJQU ͜Ε·Ͱ ߏจղੳ > Hello Hello > World World ࣮ߦ ஗͍
  9. function hoge() { console.log(“Hello Hello”); } function fuga() { //

    fugafufa console.log(“World World”); } +BWB4DSJQU 7 > Hello Hello > World World ಈతʹϚγϯޠʹม׵ 0100101 0010010 1010101 0101010 1010100 ࣮ߦ ΊͬͪΌ଎͍