Giter VIP home page Giter VIP logo

thorium-node-client's Introduction

Thorium React Client

A demonstration of how a Node Thorium client connects to the Thorium server using GraphQL.

Running

First, start up Thorium Server.

Then, start up this client:

npm install
npm start

Then, assign it to a flight and simulator.

Steps

  1. The app uses Bonjour to detect Thorium servers running on the network. It connects to the first detected server.
  2. It registers the app as a client which can be used by Thorium.
  3. It queries and subscribes to information about the client, specifically the assigned flight, simulator, and station.
  4. Once the flight, simulator, and (optionally) station are assigned in the server, it triggers an event on the App object, which serves as an event emitter. The client can then subscribe to more specific information.

Assigning a station is optional. For example, an external client built with this framework might only ever show a single screen or perform a single action. In that case, it only needs access to the simulator data.

Additionally, if you want to configure this to allow the flight director to choose between different screens, you can add those as a list of strings in availableCards array in the ./helpers/registerClient.js. These cards are registered with the client when the client registers for the first time.

thorium-node-client's People

Contributors

alexanderson1993 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.