Coder Social home page Coder Social logo

huecodechallenge's Introduction

Installation

Dependencies

git clone https://github.com/minervas/hueCodeChallenge.git;
cd hueCodeChallenge;
  • now you can build and run with either docker or node.js

Configuration

This app can be configured two ways

  • by using environment variables
  • by editing the ./config/default.json file directly

Here is a description of the config variables that are available:

  • BRIDGE_IP: the IP of the running bridge (default "127.0.0.1")
  • BRIDGE_PORT: the port of the running bridge (default 8080)
  • USER_NAME: the user name to issue api requests against (default "newdeveloper")
  • REQUEST_TIMEOUT: how many milliseconds to wait before timing out a request to the bridge (default 3000)
  • LIGHT_SEARCH_INTERVAL: not currently used
  • LIGHT_SEARCH_DURATION: not currently used
  • STATE_CHANGE_MONITOR_INTERVAL: how many milliseconds to wait until polling the bridge for light state changes (default 1000)

(using environment variables is a little easier when you are running it with docker)

NOTE: The script will fail immediately if it is not configured with the correct BRIDGE_IP and BRIDGE_PORT (or if the bridge on that IP:PORT is not currently running at startup). I have not yet implemented the bridge discovery as I am not sure if it is within the scope of the challenge.

NOTE: The USER_NAME must be valid see ./index.js comments for more details

Installation with docker

  • build the container:
docker build -t hue-code-challenge:1.0.0 .;
docker run -it --rm -e "BRIDGE_IP=<your bridge ip here>" -e "BRIDGE_PORT=<your bridge port here>"" hue-code-challenge:1.0.0;

Installation with Node.js

npm install;
BRIDGE_IP=<your bridge ip here> BRIDGE_PORT=<your bridge port here> npm start;

huecodechallenge's People

Contributors

minervas avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.