node. js with WebSocket Implementation Web page bucket landlord (first, environment configuration)

Source: Internet
Author: User
Tags install node

I've been doing nothing lately and studied node. JS Technology. Find out that node. JS is really powerful, and it works with Socket.io to implement the Web socket communication technology. So I decided to make a web version of the landlord to play a good game this websocket technology, hehe!!!

To deploy the environment first

    • 1. Install node. js

Depending on your operating system, go to the node. JS website to download and install. If the installation is successful. Enter node-v and npm-v at the command line to see the corresponding version number. Here is my version information

1 node-2v4.0.0  3 npm-42.14.2
    • 2. Build WebSocket Server

Install Express and Socket.io using the npm command

1 npm Install--Save Express2 npm install--save Socket.io

node. js with WebSocket Implementation Web page bucket landlord (first, environment configuration)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.