GithubHelp home page GithubHelp logo

bustawin / devicehubclient Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ereuse/devicehubclient

0.0 1.0 0.0 3.63 MB

License: GNU Affero General Public License v3.0

JavaScript 81.87% HTML 13.56% CSS 4.57%

devicehubclient's Introduction

DeviceHubClient

AngularJS client for DeviceHub.

DeviceTag.io has a nice quickstart guide that showcases DeviceHubClient.

Installation

Requirements

  • NodeJS 7.4 or greater with npm (usually bundled together).
  • Several npm and bower packages that are automatically installed. See them here and here.

Install and build

  1. Download or clone this project.
  2. In the folder of the project, execute npm install. This will install both npm and bower dependencies.
  3. Configure the project by modifying the constants file.
  4. Build the project by executing npm run-script build-prod in the project folder. This will create an inner folder called dist containing an index.html that you can run with your favorite server.

Testing

You can run the project locally for manual testing. In such case build the project with npm run-script build. This will build the project with sourcemaps and auto-build when you save a file, which is very handy.

To run the unit tests, execute npm run-script test. This will run the tests once. You can keep a daemon open which will re-run the tests once it detects a change in the code. For that execute node ./node_modules/gulp/bin/gulp.js unit-test.

To run the E2E tests you will require access to a DeviceHub, so your DeviceHubClient will need to be configured to connect to a DeviceHub. Moreover, this DeviceHub will need to have populated the database with the dummy values.

  1. Execute node ./node_modules/gulp/bin/gulp.js run-selenium. This will install and run Selenium, which is a server specialized in E2E tests.
  2. Run node ./node_modules/protractor/bin/protractor protractor.conf.js in another terminal. This will open a Chrome window and run the tests there. I recommend not putting something above the Chrome window or minimizing it, as it can break the tests.

Note that you can ease the execution of the tests using a good IDE, like WebStorm. See how to configure Protractor and Gulp in WebStorm.

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.