Socket.io-client: "์˜ˆ๊ธฐ์น˜ ์•Š์€ ํ† ํฐ

์— ๋งŒ๋“  2015๋…„ 05์›” 14์ผ  ยท  5์ฝ”๋ฉ˜ํŠธ  ยท  ์ถœ์ฒ˜: socketio/socket.io-client

๋‹ค์Œ๊ณผ ๊ฐ™์ด ํด๋ผ์ด์–ธํŠธ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ๋กœ๋“œํ•  ๋•Œ:

๋ชจ๋“  5 ๋Œ“๊ธ€

src="js/socket.io.js"

src="/socket.io/socket.io.js" ์—ฌ์•ผ ํ•ฉ๋‹ˆ๋‹ค.

์ด html ํŒŒ์ผ์„ ์‚ฌ์šฉํ•˜์—ฌ ๋™์ผํ•œ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.

<!doctype html>
<html lang="en">
<head>
  <!-- The first thing in any HTML file should be the charset -->
  <meta charset="utf-8">
  <!-- Make the page mobile compatible -->
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <!-- Allow installing the app to the homescreen -->
  <link rel="manifest" href="manifest.json">
  <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/leaflet.css">
  <meta name="mobile-web-app-capable" content="yes">
  <title>AP Flora</title>
</head>
<body>
<!-- The app hooks into this div -->
<div id="app"></div>
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700,900" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto+Mono" rel="stylesheet">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<!-- A lot of magic happens in this file. HtmlWebpackPlugin automatically includes all assets (e.g. bundle.js, main.css) with the correct HTML tags, which is why they are missing in this HTML file. Don't add any assets here! (Check out webpackconfig.js if you want to know more) -->
<script src="/socket.io/socket.io.js"></script>
<script>
  const socket = io()
  console.log(`socket:`, socket)
</script>
</body>
</html>

๋‚ด๊ฐ€ ๋ญ˜ ์ž˜๋ชปํ•˜๊ณ  ์žˆ์ฃ ?

๋‹ค์Œ์„ ์‚ฌ์šฉํ•  ๋•Œ ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค.

<script src="https://cdn.socket.io/socket.io-1.4.0.js"></script>

Wo๋Š” _is_ ์ •ํ™•ํ•œ URL์ด ๋ฌด์—‡์ž…๋‹ˆ๊นŒ?

socket.io.js๋ฅผ ๋กœ์ปฌ๋กœ ํ˜ธ์ถœํ•˜๋ฉด browserify๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์˜ฌ๋ฐ”๋ฅธ ํ•„์ˆ˜ ํŒŒ์ผ์„ ์ปดํŒŒ์ผํ•  ๋•Œ ์ž‘๋™ํ–ˆ์Šต๋‹ˆ๋‹ค. ๋˜ ๋‹ค๋ฅธ ๋ฐฉ๋ฒ•์€ _socket.io-client_ ๋‚ด๋ถ€์˜ lib๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค.

์ด ํŽ˜์ด์ง€๊ฐ€ ๋„์›€์ด ๋˜์—ˆ๋‚˜์š”?
0 / 5 - 0 ๋“ฑ๊ธ‰
bleepcoder.com์€ ๊ณต๊ฐœ์ ์œผ๋กœ ๋ผ์ด์„ ์Šค ๋œ GitHub ์ •๋ณด๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์ „ ์„ธ๊ณ„ ๊ฐœ๋ฐœ์ž์—๊ฒŒ ๋ฌธ์ œ์— ๋Œ€ํ•œ ์†”๋ฃจ์…˜์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค. ์šฐ๋ฆฌ๋Š” GitHub, Inc. ๋˜๋Š” ํ”„๋กœ์ ํŠธ์— GitHub๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๋‹ค๋ฅธ ๊ฐœ๋ฐœ์ž์™€ ๊ด€๋ จ์ด ์—†์Šต๋‹ˆ๋‹ค. ์šฐ๋ฆฌ๋Š” ์„œ๋ฒ„์—์„œ ๋น„๋””์˜ค ๋‚˜ ์ด๋ฏธ์ง€๋ฅผ ํ˜ธ์ŠคํŒ…ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ๋ชจ๋“  ๊ถŒ๋ฆฌ๋Š” ํ•ด๋‹น ์†Œ์œ ์ž์—๊ฒŒ ์žˆ์Šต๋‹ˆ๋‹ค.
์ด ํŽ˜์ด์ง€์˜ ์†Œ์Šค: ์ถœ์ฒ˜

์ธ๊ธฐ์žˆ๋Š” ํ”„๋กœ๊ทธ๋ž˜๋ฐ ์–ธ์–ด
์ธ๊ธฐ์žˆ๋Š” GitHub ํ”„๋กœ์ ํŠธ
๋” ๋งŽ์€ GitHub ํ”„๋กœ์ ํŠธ

ยฉ 2024 bleepcoder.com - Contact
Made with in the Dominican Republic.
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.