0 PrefaceThis article attempts to build a Nodejs-based Coap Server in the Windows platform. Linux platform build and use process can refer to--coap learning Note--nodejs node-coap installation and use (Linux platform)"test Environment"--windows"Related blog posts"
"Coap Agreement Learning--coap Foundation" "Coap Learning Notes--coap resource Discovery" "COAP Learning Notes-Process request flow when server-side busy" "Raspberry Pi Learning Notes--webiopi installation and Getting Started" Webiopi integrates Coap Server, The Raspberry Pi Gpio can be controlled conveniently through the COAP protocol.
1 Installing Nodejs"1" Go to nodejs official website to download the Windows installation package. "2" or go to the domestic mirror to download the Windows installation package.
2 Installing Node-coapThere are a few differences between installing the Node-coap module on Windows and Linux, installing the CNPM tool before installation, using Nodejs's domestic module source instead of the foreign module source. "1" Installation CNPM tool npm install-g cnpm--registry=http://r.cnpmjs.org Registry parameter can specify warehouse, here select Domestic Warehouse. "2" Installation Node-coapcnpm Install CoapPlease note that the name of the Node-coap here and the Linux installationdifferent names, Linux uses NPM to install the module with the name Node-coap. Please refer to CNPM coap module for more details. "3" Installation Coap-clicnpm Install COAP-CLIPlease refer to CNPM coap-cli module for more details.
3 Simple testPlease refer to Nodejs node-coap installation and use (Linux platform) Part III.
4 References"1" cnpm tool "1" Cnblog blog--npm through the wall
Coap Learning notes--nodejs Node-coap Installation and use (Windows platform)