Node.js Server app for the Pier 9 IoT viewer
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
broker
docs
sensor
server
www
.bowerrc
.gitignore
LICENSE
README.md
bower.json
package.json
start.js

README.md

Internet of Things (IoT) for Pier 9

build status Node.js npm Platforms License

Forge API: oAuth2 Data-Management OSS Model-Derivative Viewer

Note: It also relies on the https://github.com/cyrillef/PlougonvelinNode Project which is the real brain running on a BeagleBone Black device which controls the shutters, lights, and sensors.

Live demo at

http://pier9.autodesk.io/

Description

This sample uses the Autodesk Forge Viewer to display the CNC Workshop, and implements a Viewer IoT Extension to connect to the Raspberry PI IoT broadcaster via a secured socket.io connection.

Dependencies

This sample is dependent on the server part on Node.js and couple of Node.js extensions which would update/install automatically via 'npm':

This sample is dependent of Node.js and few Node.js extensions which would update/install automatically via 'npm'.

  1. Node.js - built on Chrome's JavaScript runtime for easily building fast, scalable network applications. You can get Node.js from here

This sample is also dependent on the client side on couple of javascript library which would update/install automatically via 'bower':

  1. Bootstrap - Bootstrap is the most popular HTML, CSS, and JS framework for developing responsive, mobile first projects on the web.

  2. jQuery.

Setup/Usage Instructions

Deploy on a server or local machine

  1. Download and install Node.js (that will install npm as well)

  2. Download this repo anywhere you want

  3. Execute 'npm install', this command will download and install the required node & bower modules automatically for you.

    npm install
    
  4. Edit file ./html/index.html line #75-77, and set your model URN
    Edit files in ./html/data to describe your model / sensors settings.

  5. Install your credential keys:
    Use system environment variables (This is actually the option you need to use for the tests suite which runs on Travis-CI). Replace keys placeholder xxx with your own keys.

          * Windows<br />
            ```
            set FORGE_CLIENT_ID=xxx
    
            set FORGE_CLIENT_SECRET=xxx
    
            [set PORT=<port>]
    
     	node start.js
            ```
          * OSX/Linux<br />
            ```
            [sudo] [PORT=<port>] FORGE_CLIENT_ID=xxx FORGE_CLIENT_SECRET=xxx node start.js
            ```
    

    Note: the port argument can be omitted and default to port 80. If port 80 is already in use by another application (like Skype, or IIS, or Apache, ...), you can use any other free port such as 8000, 3000, etc... But in the next section you would need to specify the port to use, i.e. http://localhost[:port]/

License

This sample is licensed under the terms of the MIT License. Please see the LICENSE file for full details.

Written by

Hans Kellner, Autodesk, Inc.
OCTO

Alex Chein, Autodesk, Inc.
PDG

Cyrille Fauvel (Autodesk Developer Network)
http://www.autodesk.com/adn
http://around-the-corner.typepad.com/