当前位置:网站首页>【网络通信学习笔记】Socket.IO的搭建和部署
【网络通信学习笔记】Socket.IO的搭建和部署
2022-06-29 02:10:00 【心中有光,不惧路长】
实验环境
CentOS 7.8
安装Node.js
curl -sL https://rpm.nodesource.com/setup_14.x | sudo bash - && sudo yum clean all && sudo yum makecache fast && sudo yum install -y gcc-c++ make && sudo yum install -y nodejs
输入关键字+-v可验证版本信息(是否安装成功)
如:
npm -v
创建Web环境目录
拉取socket demo
wget https://codeload.github.com/socketio/chat-example/zip/refs/heads/master && unzip master && mv chat-example-master/* /root/www/
搭建socket.io
安装express
cd www && npm install express --save
安装socket.io
npm install --save socket.io
运行Demo
关闭https强制校验:
npm config set strict-ssl false
运行下列命令,启动demo:
node index.js
可访问1.12.66.206:3000查看效果
边栏推荐
- 【Redis】数据介绍 & 通用命令 & String类型
- Qt基础教程:数据类型与容器
- I'd like to ask you, where can I open an account in Zhongshan? Is it safe to open an account online?
- Business system anti-virus
- [understanding of opportunity -33]: seeing is not necessarily true. Most of the time, "seeing is false"
- Use code binding DataGridView control to display tables in program interface
- [learn FPGA programming from scratch -50]: Vision - how are chips made? The thirteen steps of chip manufacturing.
- Fundamentals of scala (3): operators and process control
- 项目研发,有哪些好用的免费脑图工具软件
- How to become a senior digital IC Design Engineer (3-5) tools: Spyglass Technology
猜你喜欢

When you complain about the roll, others have quietly begun to prepare for the golden three silver four

独家分析 | 软件测试关于简历和面试的真实情况

Finally got the byte offer. The 25-year-old inexperienced experience in software testing is written to you who are still confused
![[understanding of opportunity -33]: seeing is not necessarily true. Most of the time,](/img/60/703a5bc3038d28bcf812415032f240.jpg)
[understanding of opportunity -33]: seeing is not necessarily true. Most of the time, "seeing is false"

How to become a senior digital IC Design Engineer (4-2) script: file read / write operation realized by Verilog HDL code

In simple terms, server intrusion prevention

SAP ui5 beginner tutorial 22 - development and use of filter

【Redis】初识 Redis

【Redis】SortedSet类型

【Redis】Hash类型
随机推荐
How to manage device authorization
Eliminate the hover effect when the button is disabled
东方财富股票开户是会有什么风险吗?东方财富开户安全吗
Digital IC design, FPGA design written examination questions, answers and analysis of autumn move (1) 2022 Ziguang zhanrui (Part 1)
Finally got the byte offer. The 25-year-old inexperienced experience in software testing is written to you who are still confused
大三下期末考试
How to become a senior digital IC Design Engineer (4-3)
How to prevent virus
HBuilder左侧工具栏不见了
[从零开始学习FPGA编程-50]:视野篇 - 芯片是如何被制造出来的?芯片制造的十三大步骤。
SQL splits strings into tables
How to become a senior digital IC Design Engineer (6-5) digital IC Verification: coverage collection
[redis] hash type
e. Difference between target and e.currenttarget
What is stock online account opening? Is it safe to open an account online?
Oculusrifts and unity UI interaction (1) - Overview
I'd like to ask you, where can I open an account in Zhongshan? Is it safe to open an account online?
跨境资讯站
Kubernetes: container resource requirements and constraints (constraints)
Analysis of sending principle of OData metadata request for SAP ui5 application