nodejs server

https://gitee.com/leijmdas/general-proxy.git

        该项目是基于Koa2的通用代理服务,主要功能包括:1)代理Strapi和Go API请求;2)支持多种协议接口(REST/GraphQL/gRPC);3)提供消息格式化、权限控制和日志扩展;4)支持NATS消息队列和数据库操作。项目通过protoc工具生成gRPC接口代码,支持多种输出格式(commonjs/grpc_js)。目前正在开发认证功能(auth)。该代理服务不处理复杂业务逻辑,专注于接口代理和数据组装,适合作为微服务架构中的中间层。

  1. 基于koa2
  2. 使用代理封装不同环境的消息
  3. strapi消息格式化
  4. 权限等扩展
  5. 日志扩展
  6. 组装数据与接口,不处理复杂业务
  7. 对strapi rest或者graphql, goapi消息进行扩展

yarn add grpc ../../../node_modules/grpc-tools/bin/protoc --js_out=import_style=commonjs,binary:./ --plugin=protoc-gen-grpc=../../../node_modules/grpc-tools/bin/grpc_node_plugin.exe --grpc_out=./ HelloWorldService.proto ../../../node_modules/grpc-tools/bin/protoc --js_out=import_style=commonjs,binary:./ --plugin=protoc-gen-grpc=../../../node_modules/grpc-tools/bin/grpc_node_plugin.exe --grpc_out=./ ./protos/*.proto

//pb消息接口生成工个 protoc-gen-grpc --js_out=import_style=commonjs:. --grpc_out=. .\hello.proto D:\nodejs\strapi-service\strapi-proxy\node_modules.bin\protoc-gen-grpc --js_out=import_style=commonjs:. --grpc_out=. *

https://vrg123.com/ data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8;base64,

yarn global add protoc-gen-grpc

npm install protoc-gen-grpc -g

{"order_id":"787098449438015489"} template_id:799103435969134593

npm install protoc-gen-grpc-ts -g

npm install protoc-gen-grpc -g protoc-gen-grpc --js_out=import_style=commonjs:. --grpc_out=. *.proto

protoc-gen-grpc --js_out=import_style=commonjs:. --grpc_out=grpc_js:. .\hello.proto

npx node_protoc2 --out_dir . *.proto protoc-gen-grpc --ts_out=grpc_js:. --grpc_out=. *.proto

目前strapi-proxy能力: 1 strapi代理 2 goapi代理 3 db 4 nats 5 rest 6 grpc 7 auth: 开发中

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

leijmdas

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值