ADempiere Web Store write in Javascript for a node service
npm install @adempiere/grpc-web-store-apiADempiere gRPC Web Store API library to Node.js
==============
!node version



ADempiere node.js write in JavaScript for gRPC service, use it for connect with:
- ADempiere-gRPC-Server, docker image erpya/adempiere-grpc-all-in-one.
See also:
- eCommerce-ADempiere, docker image erpya/adempiere-ecommerce.
- Proxy-Adempiere-API, docker image erpya/proxy-adempiere-api.
``shell`installing via NPM
npm install @adempiere/grpc-web-store-api --save
`shell`installing via Yarn
yarn add @adempiere/grpc-web-store-api
shell
install dependecies and dev dependencies
npm igenerate 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
$3
It can be installed as a global dependency although it is already managed as a project dependency.Via npm:
`shell
sudo npm install -g grpc-tools
`Via yarn:
`shell
yarn global add grpc-tools
`Generate all stub:
`shell
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:
`shell
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:
`shell
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:
`shell
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/
`
$3
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`Become a sponsor and get your logo on our README on GitHub with a link to your site. Become a sponsor