c, -config set config file (defaul t: ~/.cncrc) b, -backlog set listen backlog (defaul t: 511) l, -host set listen address or hostname (defaul t: 0.0. p, -port set listen port (defaul t: 8000) Run cnc to start the server, and visit to view the web interface.
Run npm install -g to install the latest version. For Raspbian Wheezy, be sure to install gcc/g++ 4.8 before npm install.Ĭheck out for other installation methods. It’s recommended that you run Raspbian Jessie on the RPi2 or RPi3. If you’re going to use sudo or root to install cncjs, you need to specify the -unsafe-perm option to run npm as the root account. Install cncjs as a non-root user, or the serialport module may not install correctly on some platforms like Raspberry Pi. If you’re using Node.js 4 or earlier versions, it’s recommended that you upgrade npm to the latest version. Once installed, you can select Node.js versions with: nvm install 4 Git checkout `git describe -abbrev=0 -tags`Īdd these lines to your ~/.bash_profile, ~/.bashrc, or ~/.profile file to have it automatically sourced upon login: export NVM_DIR= " $HOME/.nvm" If you have git installed, just clone the nvm repo, and check out the latest version: git clone https: ///creationix/nvm.git ~ /.nvm cd ~ /.nvm You can install Node Version Manager to manage multiple Node.js versions. We have a dedicated setup guide for setting up Node.js, NVM, CNC.js, Autostart with pm2, all tested on the Raspberry Pi.