Giter Site home page Giter Site logo

grpc-web-store-api's Introduction

ADempiere gRPC Web Store API library to Node.js

node version npm version License Downloads

ADempiere node.js write in JavaScript for gRPC service, use it for connect with:

See also:

Using it

# installing via NPM
npm install @adempiere/grpc-web-store-api --save
# installing via Yarn
yarn add @adempiere/grpc-web-store-api

A Example

Here a example for it using from Proxy of ADempiere API: https://github.com/adempiere/proxy-adempiere-api/blob/master/src/modules/adempiere-api/index.ts#L17

Recreate proto stub class (only for contribute to project)

For recreate stub class you must have follow:

Generate Proto Stub:

Generate with npm (Recommended):

# install dependecies and dev dependencies
npm i

# generate all stub
npm run stub

Note to generate specific proto definition:

  • To access: npm run stub:access
  • To client: npm run stub:client
  • To web store: npm run stub:web_store

Generate directly with grpc_tools_node_protoc:

It can be installed as a global dependency although it is already managed as a project dependency.

Via npm:

sudo npm install -g grpc-tools

Via yarn:

yarn global add grpc-tools

Generate all stub:

grpc_tools_node_protoc \
  --js_out=import_style=commonjs,binary:src/grpc/ \
  --grpc_out=src/grpc/ \
  proto/access.proto proto/client.proto proto/web_store.proto
  # --grpc-web_out=import_style=commonjs,mode=grpcwebtext:src/grpc/
  • To access:
# Generate stub to access.proto file
grpc_tools_node_protoc \
  --js_out=import_style=commonjs,binary:src/grpc/  \
  --grpc_out=grpc_js:src/grpc/ \
  proto/access.proto
  # --grpc-web_out=import_style=commonjs,mode=grpcwebtext:src/grpc/
  • To client:
# Generate stub to client.proto file
grpc_tools_node_protoc \
  --js_out=import_style=commonjs,binary:src/grpc/  \
  --grpc_out=grpc_js:src/grpc/ \
  proto/client.proto
  # --grpc-web_out=import_style=commonjs,mode=grpcwebtext:src/grpc/
  • To web store:
# Generate stub to web_store.proto file
grpc_tools_node_protoc \
  --js_out=import_style=commonjs,binary:src/grpc/  \
  --grpc_out=grpc_js:src/grpc/ \
  proto/web_store.proto
  # --grpc-web_out=import_style=commonjs,mode=grpcwebtext:src/grpc/

Output proto stub

The result is generated on: src/grpc/proto/ folder:

  • access_grpc_pb.js
  • access_pb.js
  • client_grpc_pb.js
  • client_pb.js
  • web_store_grpc_pb.js
  • web_store_pb.js

Sponsors

Become a sponsor and get your logo on our README on GitHub with a link to your site. Become a sponsor

grpc-web-store-api's People

Contributors

yamelsenih avatar edwinbetanc0urt avatar

Watchers

James Cloos avatar Carlos Parada avatar  avatar  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.