Skip to content

hanc1027-practice/vue-protobuf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

前端使用protobuf

protobuf使用流程

  1. 將後端提供的所有的proto檔案copy進 src/proto 資料夾
  2. 執行 npm run proto 生成js檔

此專案所用套件

  1. axios
  2. google-protobuf
$ npm install axios google-protobuf --save-dev

*.proto檔案打包成js檔

$ cd src/proto/
$ protoc --js_out=import_style=commonjs,binary:. awesome.proto

- �已寫好`*.proto`轉js檔的指令:
```bash
$ npm run proto
# 更新proto檔案後,執行此指令即可重新生成最新的js

run serve

$ npm run serve

About

[練習專案]

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors