Giter VIP home page Giter VIP logo

quark-node's Introduction

Visit project web page here.

This is client library for NodeJS enabling communication with Green Screens Quark Engine for Java.

Use it to call remote Java services based on Quark Engine methodology.

Calls are the same as for browser API's, engine will dynamically generate API calls to be used across NodeJS app.

Upon initialization with

const QuarkEngine = require('./lib/engine');

const channelWeb = "http://localhost:8080/io.greenscreens.quark/api";
const channelWS = "ws://localhost:8080/io.greenscreens.quark/socket";

let Engine = new QuarkEngine({api:channelWeb, service: channelWS});
await Engine.init();

Use the following to get generated API, or attach it to the global object. io is first part of namespace group defined in Java server side controllers.

const { io } = Engine.api();
global.io = io;

Multi-service is supported also. Simply initialize another Engine instance.

Install

  1. Download or clone repository or install it from npm with
npm i quark-engine
  1. execute npm install to install dependencies
  2. Start Java demo web app from quark-engine repo
  3. execute node test.js

NOTE: WebCrypto wrapper for NodeJs copied from link below as module is not in npm. Lib is used to wrap NodeJS crypto API into WebCrypto API for compatibility purposes. https://github.com/nodejs/webcrypto

© Green Screens Ltd. 2016 - 2021

quark-node's People

Contributors

greenscreens-io 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.