Skip to content
This repository has been archived by the owner on Aug 13, 2018. It is now read-only.

istrategylabs/paw

Repository files navigation

Stories in Ready

PAW: Puppies at Work

PAW preview

PAW is a Slack-integrated tracking system for dogs in the workplace. It allows owners to effortlessly keep tabs of their pets without needing to have them tethered to a desk all day.

Up-and-running

First, start a Redis server for storing data.

Then, to start the API server:

npm run start

or to start the API server with Nodemon + a client with Browsersync server:

npm run dev

or to build, cachebust, and minify all assets for production:

npm run build

Finally, send external events to the /api/event endpoint. The payload should be formatted as:

{
	events: [
		{
			device: String,
			location: String,
			time: Date
		},
		...
	]
}

Configuration

Application config lives in config.js and uses nconf. The same configuration is shipped with Node and the browser.

Node

In Node, require the file then use nconf to get a config value by name:

var config = require('./config');
var TOKEN = config.get('ISL_API_TOKEN');

Browserify

In Browserify, we load the nconf configuration with envify. Refer to your config value through process.env:

setInterval(function() {
  fetch();
}, process.env.DOG_POLLING_INTERVAL_MS);

About

BTLE dog tracking system that keeps tabs of dogs in the workplace... unleash your dog.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published