You will need:

  • Node.js and npm (Node Package Manager)
  • Gulp 
  • spycam.io IP Camera Tool

Step 1 - Install Node.js

to install Node, visit nodejs.org and click the "Install" button to download the installer for your OS. Follow the instructions and after finished, you should have Node and npm (Node Package Manager) installed.

- to ensure that Node is properly installed type into the terminal: 

node -v

you should get a response with the version number of Node

npm -v

will get you the version number of npm

Step 2 - Prepare

- navigate to your project directory e.g.  

cd /Documents/Project/my-project

the ls command will list the contents of a directory and helps finding your way around, cd will change the directory, use the [Tab] key to auto-complete long directory-names

- once you made it to your project directory, use npm to initialize your package.json file: 

npm init

this will create the package.json file in your root directory which will provide information about your project and help manage dependencies

Step 3 - Install Gulp

- grant you administrator access (sudo), install package globally (-g),  

sudo npm install -g gulp

- to ensure that Gulp is properly installed type into the terminal:

gulp -v

and this should return the Gulp version number

- also install gulp locally, using the --save-dev flag to add the dependency to your devDependencies list in package.json

npm install --save-dev gulp

Step 4 - Install required Plugins

 

npm install gulp-jshint gulp-sass gulp-concat gulp-uglify gulp-rename --save-dev

*for spycam.io 0.2.2 use:

npm install gulp-browserify gulp-connect gulp-plumber gulp-sass gulp-util plumber reactify require-dir vinyl-buffer vinyl-source-stream watchify --save-dev

- prepend with sudo e.g. sudo npm install gulp-sass --save-dev if you are getting permissions errors, also read this great article to find out more about these plugins also to learn more about how to use your command-line interface

Step 5 - Start spycam.io tool

- download the spycam.io IP Camera Tool source code and extract it to your project folder

- run Gulp

gulp

this will call gulp and run everything needed to start spycam.io

Step 6 - Access spycam.io tool

- in your browser navigate to http://localhost:8080 and you should see the IP Camera Tool up and running!

Troubleshooting

How to resolve "Cannot find module" error?

- while still in your project folder, run npm install {module-name} more info here e.g. require-dir