{"id":38396,"date":"2024-11-01T17:18:10","date_gmt":"2024-11-01T17:18:10","guid":{"rendered":"http:\/\/atmokpo.com\/w\/?p=38396"},"modified":"2024-11-26T06:44:26","modified_gmt":"2024-11-26T06:44:26","slug":"express-%ea%b0%9c%eb%b0%9c-%ea%b0%95%ec%a2%8c-socket-io%eb%a5%bc-%ec%9d%b4%ec%9a%a9%ed%95%9c-%ec%8b%a4%ec%8b%9c%ea%b0%84-%ed%86%b5%ec%8b%a0-%ea%b5%ac%ed%98%84","status":"publish","type":"post","link":"https:\/\/atmokpo.com\/w\/38396\/","title":{"rendered":"Express \uac1c\ubc1c \uac15\uc88c, Socket.io\ub97c \uc774\uc6a9\ud55c \uc2e4\uc2dc\uac04 \ud1b5\uc2e0 \uad6c\ud604"},"content":{"rendered":"<p><body><\/p>\n<p>\uc774\ubc88 \uac15\uc88c\uc5d0\uc11c\ub294 Node.js\uc758 <code>Express<\/code> \ud504\ub808\uc784\uc6cc\ud06c\uc640 <code>Socket.io<\/code> \ub77c\uc774\ube0c\ub7ec\ub9ac\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc2e4\uc2dc\uac04 \ud1b5\uc2e0\uc744 \uad6c\ud604\ud558\ub294 \ubc29\ubc95\uc5d0 \ub300\ud574 \uc54c\uc544\ubcf4\uaca0\uc2b5\ub2c8\ub2e4. \uc2e4\uc2dc\uac04 \ud1b5\uc2e0\uc740 \uc0ac\uc6a9\uc790\uc640 \uc2dc\uc2a4\ud15c \uac04\uc758 \uc989\uac01\uc801\uc778 \ub370\uc774\ud130 \uc804\uc1a1\uc744 \uac00\ub2a5\ud558\uac8c \ud558\uc5ec, \uc6f9\uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc758 \uc0ac\uc6a9\uc790 \uacbd\ud5d8\uc744 \ud06c\uac8c \ud5a5\uc0c1\uc2dc\ud0b5\ub2c8\ub2e4. \uc608\ub97c \ub4e4\uc5b4, chatting application\uc774\ub098 \uc2e4\uc2dc\uac04 \ub370\uc774\ud130 \ub300\uc2dc\ubcf4\ub4dc\uc640 \uac19\uc740 \uc2dc\uc2a4\ud15c\uc5d0\uc11c \uc720\uc6a9\ud558\uac8c \uc0ac\uc6a9\ub429\ub2c8\ub2e4.<\/p>\n<h2>1. Socket.io\ub780?<\/h2>\n<p><code>Socket.io<\/code>\ub294 \uc6f9 \uc18c\ucf13\uc744 \uae30\ubc18\uc73c\ub85c \ud55c \uc2e4\uc2dc\uac04 \uc591\ubc29\ud5a5 \ud1b5\uc2e0\uc744 \uc704\ud55c JavaScript \ub77c\uc774\ube0c\ub7ec\ub9ac\uc785\ub2c8\ub2e4. Socket.io\ub294 \ud074\ub77c\uc774\uc5b8\ud2b8\uc640 \uc11c\ubc84 \uac04\uc758 \uc2e4\uc2dc\uac04 \uc5f0\uacb0\uc744 \uc0dd\uc131\ud558\uace0, \uc774\ub97c \ud1b5\ud574 \ub370\uc774\ud130\ub97c \uc2e4\uc2dc\uac04\uc73c\ub85c \uc804\uc1a1\ud560 \uc218 \uc788\uac8c \ud574\uc90d\ub2c8\ub2e4. \uc774 \ub77c\uc774\ube0c\ub7ec\ub9ac\ub294 \uc6f9 \uc18c\ucf13, HTTP Long Polling \ub4f1 \uc5ec\ub7ec \uc804\uc1a1 \ubc29\ubc95\uc744 \uc9c0\uc6d0\ud569\ub2c8\ub2e4.<\/p>\n<h3>1.1 \ud2b9\uc9d5<\/h3>\n<ul>\n<li>\uc2e4\uc2dc\uac04 \uc591\ubc29\ud5a5 \ud1b5\uc2e0 \uc9c0\uc6d0<\/li>\n<li>\uc774\ubca4\ud2b8 \uae30\ubc18 API<\/li>\n<li>\ubaa8\ub4e0 \ube0c\ub77c\uc6b0\uc800 \uc9c0\uc6d0<\/li>\n<li>\uc790\ub3d9 \uc7ac\uc5f0\uacb0 \uae30\ub2a5<\/li>\n<\/ul>\n<h2>2. \ud658\uacbd \uc124\uc815<\/h2>\n<p>\uc774\uc81c Express\uc640 Socket.io\ub97c \uc124\uce58\ud558\uace0 \uae30\ubcf8\uc801\uc778 \uc11c\ubc84\ub97c \uc124\uc815\ud574 \ubcf4\uaca0\uc2b5\ub2c8\ub2e4. Node.js\uac00 \uc124\uce58\ub418\uc5b4 \uc788\uc5b4\uc57c \ud569\ub2c8\ub2e4. \ub9cc\uc57d \uc124\uce58\ub418\uc5b4 \uc788\uc9c0 \uc54a\ub2e4\uba74, Node.js \uacf5\uc2dd \uc6f9\uc0ac\uc774\ud2b8(<a href=\"https:\/\/nodejs.org\/\">nodejs.org<\/a>)\uc5d0\uc11c \ub2e4\uc6b4\ub85c\ub4dc\ud558\uc5ec \uc124\uce58\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<h3>2.1 \ud504\ub85c\uc81d\ud2b8 \ucd08\uae30\ud654<\/h3>\n<pre><code>mkdir socketio-example\ncd socketio-example\nnpm init -y<\/code><\/pre>\n<h3>2.2 \ud544\uc694\ud55c \ud328\ud0a4\uc9c0 \uc124\uce58<\/h3>\n<pre><code>npm install express socket.io<\/code><\/pre>\n<h2>3. \uc11c\ubc84 \ubc0f \ud074\ub77c\uc774\uc5b8\ud2b8 \uc0dd\uc131<\/h2>\n<p>\uc774\uc81c \uae30\ubcf8\uc801\uc778 Express \uc11c\ubc84\ub97c \uc0dd\uc131\ud558\uace0 Socket.io\ub97c \uc5f0\uacb0\ud558\uaca0\uc2b5\ub2c8\ub2e4.<\/p>\n<h3>3.1 Express \uc11c\ubc84 \uc124\uc815<\/h3>\n<pre><code>const express = require('express');\nconst http = require('http');\nconst socketIo = require('socket.io');\n\nconst app = express();\nconst server = http.createServer(app);\nconst io = socketIo(server);\n\napp.get('\/', (req, res) =&gt; {\n    res.sendFile(__dirname + '\/index.html');\n});\n\nio.on('connection', (socket) =&gt; {\n    console.log('\uc0c8\ub85c\uc6b4 \ud074\ub77c\uc774\uc5b8\ud2b8 \uc5f0\uacb0\ub428');\n\n    socket.on('disconnect', () =&gt; {\n        console.log('\ud074\ub77c\uc774\uc5b8\ud2b8 \uc5f0\uacb0 \ud574\uc81c');\n    });\n});\n\nconst PORT = process.env.PORT || 3000;\nserver.listen(PORT, () =&gt; {\n    console.log(`\uc11c\ubc84\uac00 http:\/\/localhost:${PORT}\uc5d0\uc11c \uc2e4\ud589 \uc911`);\n});<\/code><\/pre>\n<h3>3.2 \ud074\ub77c\uc774\uc5b8\ud2b8 HTML \ud30c\uc77c \uc0dd\uc131<\/h3>\n<p>\uc11c\ubc84\uc758 \uae30\ubcf8 \ud398\uc774\uc9c0\ub85c \uc0ac\uc6a9\ud560 <code>index.html<\/code> \ud30c\uc77c\uc744 \uc0dd\uc131\ud569\ub2c8\ub2e4.<\/p>\n<pre><code>&lt;!DOCTYPE html&gt;\n&lt;html lang=\"ko\"&gt;\n&lt;head&gt;\n    &lt;meta charset=\"UTF-8\"&gt;\n    &lt;title&gt;Socket.io \uc608\uc81c&lt;\/title&gt;\n    &lt;script src=\"\/socket.io\/socket.io.js\"&gt;&lt;\/script&gt;\n    &lt;script&gt;\n        const socket = io();\n        \n        socket.on('connect', () =&gt; {\n            console.log('\uc11c\ubc84\uc5d0 \uc5f0\uacb0\ub428');\n        });\n    &lt;\/script&gt;\n&lt;\/head&gt;\n&lt;body&gt;\n    &lt;h1&gt;Socket.io\uc640 \ud568\uaed8\ud558\ub294 \uc2e4\uc2dc\uac04 \ud1b5\uc2e0&lt;\/h1&gt;\n&lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n<h3>3.3 \uc11c\ubc84 \uc2e4\ud589<\/h3>\n<p>\uc774\uc81c \uc11c\ubc84\ub97c \uc2e4\ud589\ud574 \ubcf4\uaca0\uc2b5\ub2c8\ub2e4.<\/p>\n<pre><code>node index.js<\/code><\/pre>\n<p>\uc11c\ubc84\uac00 \uc2e4\ud589 \uc911\uc778 \uc0c1\ud0dc\uc5d0\uc11c \ube0c\ub77c\uc6b0\uc800\uc5d0\uc11c <code>http:\/\/localhost:3000<\/code>\uc73c\ub85c \uc774\ub3d9\ud558\uba74 &#8220;Socket.io\uc640 \ud568\uaed8\ud558\ub294 \uc2e4\uc2dc\uac04 \ud1b5\uc2e0&#8221;\uc774\ub77c\ub294 \ubb38\uad6c\uac00 \ud45c\uc2dc\ub418\ub294 \uc6f9 \ud398\uc774\uc9c0\ub97c \ubcfc \uc218 \uc788\uc744 \uac83\uc785\ub2c8\ub2e4.<\/p>\n<h2>4. \uae30\ubcf8 \uc774\ubca4\ud2b8 \ud1b5\uc2e0 \uad6c\ud604<\/h2>\n<p>\uc774\uc81c Socket.io\uc758 \uae30\ubcf8\uc801\uc778 \uc2a4\ud2b8\ub9bc\uc744 \uc0ac\uc6a9\ud558\uc5ec \ud074\ub77c\uc774\uc5b8\ud2b8\uc640 \uc11c\ubc84 \uac04\uc758 \uba54\uc2dc\uc9c0\ub97c \uc8fc\uace0\ubc1b\ub294 \uae30\ub2a5\uc744 \uad6c\ud604\ud574 \ubcf4\uaca0\uc2b5\ub2c8\ub2e4.<\/p>\n<h3>4.1 \uba54\uc2dc\uc9c0 \uc804\uc1a1<\/h3>\n<h4>\uc11c\ubc84 \ucf54\ub4dc \uc218\uc815<\/h4>\n<pre><code>io.on('connection', (socket) =&gt; {\n    console.log('\uc0c8\ub85c\uc6b4 \ud074\ub77c\uc774\uc5b8\ud2b8 \uc5f0\uacb0\ub428');\n\n    socket.on('chat message', (msg) =&gt; {\n        console.log('\uba54\uc2dc\uc9c0 \uc218\uc2e0: ' + msg);\n        io.emit('chat message', msg);\n    });\n\n    socket.on('disconnect', () =&gt; {\n        console.log('\ud074\ub77c\uc774\uc5b8\ud2b8 \uc5f0\uacb0 \ud574\uc81c');\n    });\n});<\/code><\/pre>\n<h4>\ud074\ub77c\uc774\uc5b8\ud2b8 \ucf54\ub4dc \uc218\uc815<\/h4>\n<pre><code>&lt;body&gt;\n    &lt;h1&gt;Socket.io\uc640 \ud568\uaed8\ud558\ub294 \uc2e4\uc2dc\uac04 \ud1b5\uc2e0&lt;\/h1&gt;\n    &lt;ul id=\"messages\"&gt;&lt;\/ul&gt;\n    &lt;form id=\"form\" action=\"&lt;!----&gt;\" onsubmit=\"sendMessage(event)\"&gt;\n        &lt;input id=\"m\" autocomplete=\"off\" \/&gt;\n        &lt;button&gt;\uc804\uc1a1&lt;\/button&gt;\n    &lt;\/form&gt;\n    \n    &lt;script&gt;\n        const socket = io();\n\n        function sendMessage(event) {\n            event.preventDefault();\n            const input = document.getElementById('m');\n            socket.emit('chat message', input.value);\n            input.value = '';\n            return false;\n        }\n\n        socket.on('chat message', (msg) =&gt; {\n            const item = document.createElement('li');\n            item.textContent = msg;\n            document.getElementById('messages').appendChild(item);\n            window.scrollTo(0, document.body.scrollHeight);\n        });\n    &lt;\/script&gt;\n&lt;\/body&gt;<\/code><\/pre>\n<h3>4.2 \uacb0\uacfc \ud655\uc778<\/h3>\n<p>\uc11c\ubc84\ub97c \uc7ac\uc2e4\ud589\ud558\uace0 <code>http:\/\/localhost:3000<\/code>\uc5d0 \uc811\uc18d\ud55c \ud6c4, \uba54\uc2dc\uc9c0\ub97c \uc804\uc1a1\ud558\uba74 \ud074\ub77c\uc774\uc5b8\ud2b8 \uac04\uc5d0 \uba54\uc2dc\uc9c0\uac00 \uc2e4\uc2dc\uac04\uc73c\ub85c \uc804\uc1a1\ub418\ub294 \uac83\uc744 \ubcfc \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<h2>5. Room \uae30\ub2a5 \uad6c\ud604<\/h2>\n<p>Socket.io\uc758 \uac15\ub825\ud55c \uae30\ub2a5 \uc911 \ud558\ub098\ub294 \ubc29(Room) \uae30\ub2a5\uc785\ub2c8\ub2e4. \uc774\ub97c \ud1b5\ud574 \uc5ec\ub7ec \uac1c\uc758 \ubc29\uc744 \ub9cc\ub4e4\uc5b4 \ud2b9\uc815 \ud074\ub77c\uc774\uc5b8\ud2b8\ub9cc \uba54\uc2dc\uc9c0\ub97c \uc218\uc2e0\ud558\ub3c4\ub85d \ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<h3>5.1 \ubc29 \ub9cc\ub4e4\uae30<\/h3>\n<pre><code>io.on('connection', (socket) =&gt; {\n    console.log('\uc0c8\ub85c\uc6b4 \ud074\ub77c\uc774\uc5b8\ud2b8 \uc5f0\uacb0\ub428');\n\n    socket.on('join room', (room) =&gt; {\n        socket.join(room);\n        console.log(`\ubc29 ${room}\uc5d0 \uc811\uc18d\ud568.`);\n    });\n\n    socket.on('chat message', (msg) =&gt; {\n        const room = msg.room;\n        const message = msg.message;\n        console.log(`\ubc29 ${room}\uc5d0 \uba54\uc2dc\uc9c0 \uc218\uc2e0: ${message}`);\n        io.to(room).emit('chat message', message);\n    });\n\n    socket.on('disconnect', () =&gt; {\n        console.log('\ud074\ub77c\uc774\uc5b8\ud2b8 \uc5f0\uacb0 \ud574\uc81c');\n    });\n});<\/code><\/pre>\n<h3>5.2 \ud074\ub77c\uc774\uc5b8\ud2b8 \ubc29 \uc785\uc7a5 \uae30\ub2a5 \ucd94\uac00<\/h3>\n<pre><code>const roomInput = document.getElementById('room-input');\nsocket.emit('join room', roomInput.value);\nsocket.emit('chat message', { room: roomInput.value, message: input.value });<\/code><\/pre>\n<h3>5.3 \uacb0\uacfc \ud655\uc778<\/h3>\n<p>\ubc29 \uae30\ub2a5 \ucd94\uac00 \ud6c4, \ud2b9\uc815 \ubc29\uc5d0 \ub4e4\uc5b4\uac00\uc11c \uba54\uc2dc\uc9c0\ub97c \uc8fc\uace0\ubc1b\uc744 \uc218 \uc788\ub294\uc9c0 \ud655\uc778\ud574 \ubcf4\uc138\uc694.<\/p>\n<h2>6. \uacb0\ub860<\/h2>\n<p>\uc774\ubc88 \uac15\uc88c\uc5d0\uc11c\ub294 Express\uc640 Socket.io\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc2e4\uc2dc\uac04 \ud1b5\uc2e0\uc744 \uad6c\ud604\ud558\ub294 \ubc29\ubc95\uc5d0 \ub300\ud574 \uc54c\uc544\ubcf4\uc558\uc2b5\ub2c8\ub2e4. \uc2e4\uc2dc\uac04 \ucc44\ud305\uc774\ub098 \ub370\uc774\ud130 \uc804\uc1a1\uc744 \ud544\uc694\ub85c \ud558\ub294 \ub2e4\uc591\ud55c \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc5d0\uc11c \uc774 \uae30\uc220\uc744 \ud65c\uc6a9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<p>\uc2e4\uc2dc\uac04 \ud1b5\uc2e0\uc744 \uad6c\ud604\ud558\uba74\uc11c \uc5ec\uc131\ud654\ub41c \uc131\uaca9\uc758 \uc0ac\uc6a9\uc790 \uacbd\ud5d8\uc744 \uc81c\uacf5\ud560 \uc218 \uc788\uc73c\uba70, \ub354 \ub098\uc544\uac00 \uc6f9 \uc18c\ucf13\uc744 \ud1b5\ud574 \ub2e4\uc591\ud55c \uae30\ub2a5\uc744 \ud655\uc7a5\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. Socket.io\uc640 Express \uc870\ud569\uc744 \uc774\uc6a9\ud55c \uc2e4\uc2dc\uac04 \ud1b5\uc2e0\uc758 \uac00\ub2a5\uc131\uc740 \ubb34\uad81\ubb34\uc9c4\ud569\ub2c8\ub2e4.<\/p>\n<h2>7. \ub354 \uc54c\uc544\ubcf4\uae30<\/h2>\n<p>\ucd94\uac00\uc801\uc778 \uc790\ub8cc\ub098 \ud3ec\uad04\uc801\uc778 Socket.io\uc758 \uae30\ub2a5\ub4e4\uc744 \ud0d0\uad6c\ud558\uace0 \uc2f6\ub2e4\uba74 \uacf5\uc2dd \ubb38\uc11c(<a href=\"https:\/\/socket.io\/docs\/\">socket.io\/docs<\/a>)\ub97c \ubc29\ubb38\ud574 \ubcf4\uc138\uc694. \uc790\uc8fc \ubb3b\ub294 \uc9c8\ubb38(FAQ) \uc139\uc158\uc774\ub098 \ub2e4\uc591\ud55c \uc608\uc81c \ucf54\ub4dc\ub3c4 \ud655\uc778\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<p><\/body><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\uc774\ubc88 \uac15\uc88c\uc5d0\uc11c\ub294 Node.js\uc758 Express \ud504\ub808\uc784\uc6cc\ud06c\uc640 Socket.io \ub77c\uc774\ube0c\ub7ec\ub9ac\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc2e4\uc2dc\uac04 \ud1b5\uc2e0\uc744 \uad6c\ud604\ud558\ub294 \ubc29\ubc95\uc5d0 \ub300\ud574 \uc54c\uc544\ubcf4\uaca0\uc2b5\ub2c8\ub2e4. \uc2e4\uc2dc\uac04 \ud1b5\uc2e0\uc740 \uc0ac\uc6a9\uc790\uc640 \uc2dc\uc2a4\ud15c \uac04\uc758 \uc989\uac01\uc801\uc778 \ub370\uc774\ud130 \uc804\uc1a1\uc744 \uac00\ub2a5\ud558\uac8c \ud558\uc5ec, \uc6f9\uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc758 \uc0ac\uc6a9\uc790 \uacbd\ud5d8\uc744 \ud06c\uac8c \ud5a5\uc0c1\uc2dc\ud0b5\ub2c8\ub2e4. \uc608\ub97c \ub4e4\uc5b4, chatting application\uc774\ub098 \uc2e4\uc2dc\uac04 \ub370\uc774\ud130 \ub300\uc2dc\ubcf4\ub4dc\uc640 \uac19\uc740 \uc2dc\uc2a4\ud15c\uc5d0\uc11c \uc720\uc6a9\ud558\uac8c \uc0ac\uc6a9\ub429\ub2c8\ub2e4. 1. Socket.io\ub780? Socket.io\ub294 \uc6f9 \uc18c\ucf13\uc744 \uae30\ubc18\uc73c\ub85c \ud55c \uc2e4\uc2dc\uac04 \uc591\ubc29\ud5a5 \ud1b5\uc2e0\uc744 \uc704\ud55c JavaScript \ub77c\uc774\ube0c\ub7ec\ub9ac\uc785\ub2c8\ub2e4. Socket.io\ub294 \ud074\ub77c\uc774\uc5b8\ud2b8\uc640 &hellip; <a href=\"https:\/\/atmokpo.com\/w\/38396\/\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;Express \uac1c\ubc1c \uac15\uc88c, Socket.io\ub97c \uc774\uc6a9\ud55c \uc2e4\uc2dc\uac04 \ud1b5\uc2e0 \uad6c\ud604&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[181],"tags":[],"class_list":["post-38396","post","type-post","status-publish","format-standard","hentry","category-express"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Express \uac1c\ubc1c \uac15\uc88c, Socket.io\ub97c \uc774\uc6a9\ud55c \uc2e4\uc2dc\uac04 \ud1b5\uc2e0 \uad6c\ud604 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/atmokpo.com\/w\/38396\/\" \/>\n<meta property=\"og:locale\" content=\"ko_KR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Express \uac1c\ubc1c \uac15\uc88c, Socket.io\ub97c \uc774\uc6a9\ud55c \uc2e4\uc2dc\uac04 \ud1b5\uc2e0 \uad6c\ud604 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"og:description\" content=\"\uc774\ubc88 \uac15\uc88c\uc5d0\uc11c\ub294 Node.js\uc758 Express \ud504\ub808\uc784\uc6cc\ud06c\uc640 Socket.io \ub77c\uc774\ube0c\ub7ec\ub9ac\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc2e4\uc2dc\uac04 \ud1b5\uc2e0\uc744 \uad6c\ud604\ud558\ub294 \ubc29\ubc95\uc5d0 \ub300\ud574 \uc54c\uc544\ubcf4\uaca0\uc2b5\ub2c8\ub2e4. \uc2e4\uc2dc\uac04 \ud1b5\uc2e0\uc740 \uc0ac\uc6a9\uc790\uc640 \uc2dc\uc2a4\ud15c \uac04\uc758 \uc989\uac01\uc801\uc778 \ub370\uc774\ud130 \uc804\uc1a1\uc744 \uac00\ub2a5\ud558\uac8c \ud558\uc5ec, \uc6f9\uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc758 \uc0ac\uc6a9\uc790 \uacbd\ud5d8\uc744 \ud06c\uac8c \ud5a5\uc0c1\uc2dc\ud0b5\ub2c8\ub2e4. \uc608\ub97c \ub4e4\uc5b4, chatting application\uc774\ub098 \uc2e4\uc2dc\uac04 \ub370\uc774\ud130 \ub300\uc2dc\ubcf4\ub4dc\uc640 \uac19\uc740 \uc2dc\uc2a4\ud15c\uc5d0\uc11c \uc720\uc6a9\ud558\uac8c \uc0ac\uc6a9\ub429\ub2c8\ub2e4. 1. Socket.io\ub780? Socket.io\ub294 \uc6f9 \uc18c\ucf13\uc744 \uae30\ubc18\uc73c\ub85c \ud55c \uc2e4\uc2dc\uac04 \uc591\ubc29\ud5a5 \ud1b5\uc2e0\uc744 \uc704\ud55c JavaScript \ub77c\uc774\ube0c\ub7ec\ub9ac\uc785\ub2c8\ub2e4. Socket.io\ub294 \ud074\ub77c\uc774\uc5b8\ud2b8\uc640 &hellip; \ub354 \ubcf4\uae30 &quot;Express \uac1c\ubc1c \uac15\uc88c, Socket.io\ub97c \uc774\uc6a9\ud55c \uc2e4\uc2dc\uac04 \ud1b5\uc2e0 \uad6c\ud604&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/atmokpo.com\/w\/38396\/\" \/>\n<meta property=\"og:site_name\" content=\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"article:published_time\" content=\"2024-11-01T17:18:10+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-11-26T06:44:26+00:00\" \/>\n<meta name=\"author\" content=\"root\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@bebubo4\" \/>\n<meta name=\"twitter:site\" content=\"@bebubo4\" \/>\n<meta name=\"twitter:label1\" content=\"\uae00\uc4f4\uc774\" \/>\n\t<meta name=\"twitter:data1\" content=\"root\" \/>\n\t<meta name=\"twitter:label2\" content=\"\uc608\uc0c1 \ub418\ub294 \ud310\ub3c5 \uc2dc\uac04\" \/>\n\t<meta name=\"twitter:data2\" content=\"2\ubd84\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/atmokpo.com\/w\/38396\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/38396\/\"},\"author\":{\"name\":\"root\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7\"},\"headline\":\"Express \uac1c\ubc1c \uac15\uc88c, Socket.io\ub97c \uc774\uc6a9\ud55c \uc2e4\uc2dc\uac04 \ud1b5\uc2e0 \uad6c\ud604\",\"datePublished\":\"2024-11-01T17:18:10+00:00\",\"dateModified\":\"2024-11-26T06:44:26+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/atmokpo.com\/w\/38396\/\"},\"wordCount\":50,\"publisher\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\"},\"articleSection\":[\"Express\uc11c\ubc84\uac1c\ubc1c\"],\"inLanguage\":\"ko-KR\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/atmokpo.com\/w\/38396\/\",\"url\":\"https:\/\/atmokpo.com\/w\/38396\/\",\"name\":\"Express \uac1c\ubc1c \uac15\uc88c, Socket.io\ub97c \uc774\uc6a9\ud55c \uc2e4\uc2dc\uac04 \ud1b5\uc2e0 \uad6c\ud604 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#website\"},\"datePublished\":\"2024-11-01T17:18:10+00:00\",\"dateModified\":\"2024-11-26T06:44:26+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/atmokpo.com\/w\/38396\/#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/atmokpo.com\/w\/38396\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/atmokpo.com\/w\/38396\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\ud648\",\"item\":\"https:\/\/atmokpo.com\/w\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Express \uac1c\ubc1c \uac15\uc88c, Socket.io\ub97c \uc774\uc6a9\ud55c \uc2e4\uc2dc\uac04 \ud1b5\uc2e0 \uad6c\ud604\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/atmokpo.com\/w\/#website\",\"url\":\"https:\/\/atmokpo.com\/w\/\",\"name\":\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/atmokpo.com\/w\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ko-KR\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\",\"name\":\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"url\":\"https:\/\/atmokpo.com\/w\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png\",\"contentUrl\":\"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png\",\"width\":400,\"height\":400,\"caption\":\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\"},\"image\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/bebubo4\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7\",\"name\":\"root\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g\",\"caption\":\"root\"},\"sameAs\":[\"http:\/\/atmokpo.com\/w\"],\"url\":\"https:\/\/atmokpo.com\/w\/author\/root\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Express \uac1c\ubc1c \uac15\uc88c, Socket.io\ub97c \uc774\uc6a9\ud55c \uc2e4\uc2dc\uac04 \ud1b5\uc2e0 \uad6c\ud604 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/atmokpo.com\/w\/38396\/","og_locale":"ko_KR","og_type":"article","og_title":"Express \uac1c\ubc1c \uac15\uc88c, Socket.io\ub97c \uc774\uc6a9\ud55c \uc2e4\uc2dc\uac04 \ud1b5\uc2e0 \uad6c\ud604 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","og_description":"\uc774\ubc88 \uac15\uc88c\uc5d0\uc11c\ub294 Node.js\uc758 Express \ud504\ub808\uc784\uc6cc\ud06c\uc640 Socket.io \ub77c\uc774\ube0c\ub7ec\ub9ac\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc2e4\uc2dc\uac04 \ud1b5\uc2e0\uc744 \uad6c\ud604\ud558\ub294 \ubc29\ubc95\uc5d0 \ub300\ud574 \uc54c\uc544\ubcf4\uaca0\uc2b5\ub2c8\ub2e4. \uc2e4\uc2dc\uac04 \ud1b5\uc2e0\uc740 \uc0ac\uc6a9\uc790\uc640 \uc2dc\uc2a4\ud15c \uac04\uc758 \uc989\uac01\uc801\uc778 \ub370\uc774\ud130 \uc804\uc1a1\uc744 \uac00\ub2a5\ud558\uac8c \ud558\uc5ec, \uc6f9\uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc758 \uc0ac\uc6a9\uc790 \uacbd\ud5d8\uc744 \ud06c\uac8c \ud5a5\uc0c1\uc2dc\ud0b5\ub2c8\ub2e4. \uc608\ub97c \ub4e4\uc5b4, chatting application\uc774\ub098 \uc2e4\uc2dc\uac04 \ub370\uc774\ud130 \ub300\uc2dc\ubcf4\ub4dc\uc640 \uac19\uc740 \uc2dc\uc2a4\ud15c\uc5d0\uc11c \uc720\uc6a9\ud558\uac8c \uc0ac\uc6a9\ub429\ub2c8\ub2e4. 1. Socket.io\ub780? Socket.io\ub294 \uc6f9 \uc18c\ucf13\uc744 \uae30\ubc18\uc73c\ub85c \ud55c \uc2e4\uc2dc\uac04 \uc591\ubc29\ud5a5 \ud1b5\uc2e0\uc744 \uc704\ud55c JavaScript \ub77c\uc774\ube0c\ub7ec\ub9ac\uc785\ub2c8\ub2e4. Socket.io\ub294 \ud074\ub77c\uc774\uc5b8\ud2b8\uc640 &hellip; \ub354 \ubcf4\uae30 \"Express \uac1c\ubc1c \uac15\uc88c, Socket.io\ub97c \uc774\uc6a9\ud55c \uc2e4\uc2dc\uac04 \ud1b5\uc2e0 \uad6c\ud604\"","og_url":"https:\/\/atmokpo.com\/w\/38396\/","og_site_name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","article_published_time":"2024-11-01T17:18:10+00:00","article_modified_time":"2024-11-26T06:44:26+00:00","author":"root","twitter_card":"summary_large_image","twitter_creator":"@bebubo4","twitter_site":"@bebubo4","twitter_misc":{"\uae00\uc4f4\uc774":"root","\uc608\uc0c1 \ub418\ub294 \ud310\ub3c5 \uc2dc\uac04":"2\ubd84"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/atmokpo.com\/w\/38396\/#article","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/38396\/"},"author":{"name":"root","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7"},"headline":"Express \uac1c\ubc1c \uac15\uc88c, Socket.io\ub97c \uc774\uc6a9\ud55c \uc2e4\uc2dc\uac04 \ud1b5\uc2e0 \uad6c\ud604","datePublished":"2024-11-01T17:18:10+00:00","dateModified":"2024-11-26T06:44:26+00:00","mainEntityOfPage":{"@id":"https:\/\/atmokpo.com\/w\/38396\/"},"wordCount":50,"publisher":{"@id":"https:\/\/atmokpo.com\/w\/#organization"},"articleSection":["Express\uc11c\ubc84\uac1c\ubc1c"],"inLanguage":"ko-KR"},{"@type":"WebPage","@id":"https:\/\/atmokpo.com\/w\/38396\/","url":"https:\/\/atmokpo.com\/w\/38396\/","name":"Express \uac1c\ubc1c \uac15\uc88c, Socket.io\ub97c \uc774\uc6a9\ud55c \uc2e4\uc2dc\uac04 \ud1b5\uc2e0 \uad6c\ud604 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/#website"},"datePublished":"2024-11-01T17:18:10+00:00","dateModified":"2024-11-26T06:44:26+00:00","breadcrumb":{"@id":"https:\/\/atmokpo.com\/w\/38396\/#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/atmokpo.com\/w\/38396\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/atmokpo.com\/w\/38396\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\ud648","item":"https:\/\/atmokpo.com\/w\/en\/"},{"@type":"ListItem","position":2,"name":"Express \uac1c\ubc1c \uac15\uc88c, Socket.io\ub97c \uc774\uc6a9\ud55c \uc2e4\uc2dc\uac04 \ud1b5\uc2e0 \uad6c\ud604"}]},{"@type":"WebSite","@id":"https:\/\/atmokpo.com\/w\/#website","url":"https:\/\/atmokpo.com\/w\/","name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","description":"","publisher":{"@id":"https:\/\/atmokpo.com\/w\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/atmokpo.com\/w\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ko-KR"},{"@type":"Organization","@id":"https:\/\/atmokpo.com\/w\/#organization","name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","url":"https:\/\/atmokpo.com\/w\/","logo":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/","url":"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png","contentUrl":"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png","width":400,"height":400,"caption":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8"},"image":{"@id":"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/bebubo4"]},{"@type":"Person","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7","name":"root","image":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g","caption":"root"},"sameAs":["http:\/\/atmokpo.com\/w"],"url":"https:\/\/atmokpo.com\/w\/author\/root\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/38396","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/comments?post=38396"}],"version-history":[{"count":1,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/38396\/revisions"}],"predecessor-version":[{"id":38397,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/38396\/revisions\/38397"}],"wp:attachment":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/media?parent=38396"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/categories?post=38396"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/tags?post=38396"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}