1— What's in the Box— Unpacking Nomad JS Base
This repo includes examples for publishing and subscribing in both Node.js and the browser. Publishing and subscribing can happen between code running in Node.js and the browser (and vice versa). For example, you might build a publisher that listens to a particle device in Node.js and then subscribe with code running in a browser.
.
├── README.md
│
├── browser # examples of running Nomad in a browser
│ ├── publish.html
│ ├── publish.js
│ ├── subscribe.html
│ └── subscribe.js
│
├── browser-bundle # the nomad js bundle for running Nomad in browser
│ └── nomad.js
│
├── node # examples of running Nomad in Node.js
│ ├── publish.js
│ └── subscribe.js
│
├── particle # examples of using Nomad to broadcast Particle data
│ ├── particle-code
│ │ └── particle-detect-cup-drop-v1.4.ino # example particle photon code
│ ├── particle-base-with-nomad.js # a template for particle Nomad node
│ ├── particle-login.json # a template for a particle api credentials object
│ ├── particle-base.js # a template for particle api request
│ └── particle-fsr-node # example particle nomad node project
│ ├── particle-fsr-subscribe.html
│ ├── particle-fsr-subscribe.js
│ └── particle-fsr-node-publisher
│ ├── particle-fsr-node.js
│ └── particle-login.json
│
├── web-api # example of using Nomad in a browser consuming a web API (OpenWeatherMap)
│ ├── webapi.html
│ └── webapit.js
│
└── package.json # already includes latest version of Nomad
Get started
Clone this repo from github and from the root directory of the repo:
git clone https://github.com/IDEO-coLAB/nomad-js-primer.git
Then install Nomad's dependencies:
npm install
Go get a cup of coffee or a beer. The latest version of Nomad is already included in package.json
so you don't need to do anything more to install it.
Now that you've installed Nomad locally, let's make a node!