mirror of
https://github.com/zhengkai/orca.git
synced 2026-02-04 16:42:26 +08:00
up
This commit is contained in:
11
proto/Makefile
Normal file
11
proto/Makefile
Normal file
@@ -0,0 +1,11 @@
|
||||
SHELL:=/bin/bash
|
||||
|
||||
server:
|
||||
protoc --go_out=../server/src *.proto
|
||||
|
||||
client:
|
||||
../client/node_modules/protobufjs/bin/pbjs -t static-module -w es6 --es6 --force-number -o ../client/src/pb/pb.js *.proto
|
||||
../client/node_modules/protobufjs/bin/pbts -o ../client/src/pb/pb.d.ts ../client/src/pb/pb.js
|
||||
sed 's#^import.*$$#const $$protobuf = require("protobufjs/minimal");#g' -i ../client/src/pb/pb.js
|
||||
|
||||
all: server client
|
||||
9
proto/req.proto
Normal file
9
proto/req.proto
Normal file
@@ -0,0 +1,9 @@
|
||||
syntax = "proto3";
|
||||
option go_package = "/pb";
|
||||
package pb;
|
||||
|
||||
message Req {
|
||||
string method = 1;
|
||||
string path = 2;
|
||||
bytes body = 3;
|
||||
}
|
||||
Reference in New Issue
Block a user