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