NodeJS Windows 0 Base build a video chat Room 1

Source: Internet
Author: User

Nodejs Installation

1. Go to http://www.nodejs.org/download/to select the Windows Installer (. msi) version of the download

2, click Install node-v0.10.31-x86.msi file (file name according to the version number named, install the latest version is).

3. Test whether the installation is successful: Open cmd window, execute node-v, if display version number indicates successful installation. If you are prompted not to find the node command, navigate through the CMD window (CD command) to the installation directory and execute node-v again to see the version number.

If you do not want to navigate to the installation directory every time before executing the command, add the path path to the Windows environment variable.

4, install the Nodejs class library.

Execute the following command in CMD (if the NPM command is not found, the same as in the previous procedure)

NPM Install Express

NPM Install Yetify

NPM Install GetConfig

NPM Install Node-uuid

NPM Install Socket.io

If you execute the NPM command prompt, the error is as follows: Error:enoent,stat ' C:\USERS\ADMINSTR.....\NPM '

Please create the NPM folder under this directory and execute the above command again. The installation was declared successful.

Download the chat room project

Click Webrtc.chatdemo.rar to download the file and unzip it, modify the Rtc.connect line in the Public\javascripts\client.js, and write your actual server address in, for example, instead: Rtc.connect ("ws://10.100.156.83:8001", "Guest");

CMD Run node (you extract directory)/app.js,

Note that the demo itself already contains HTTP server and does not require any other Apache server, which can be opened directly by browsing: http://10.100.156.83:8000

You can see the following effect.

NodeJS Windows 0 Base build a video chat Room 1

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.