Discover Packages
go.viam.com/utils
rpc
examples
fileupload
directory
Version:
v0.0.2
Opens a new window with list of versions in this module.
Published: Dec 16, 2021
License: MIT
Opens a new window with license information.
README
README
¶
Example gRPC File Upload Server
This example server demonstrates how to run a file upload server via gRPC accessible via grpc
, grpc-web
, and grpc-gateway
all on the same port while hosting other HTTP services. This is a browser only example but a go client could still be created like the echo example has.
Note: For the web, grpc-web
(Direct) will not work until https://github.com/grpc/grpc-web/issues/24 is done; WebRTC will work however.
Build
make build
Run
make run_server
make run_client
With auth
make run_server_auth
make run_client_auth
Using
Go to http://localhost:8080 , upload a file, and check the terminal output.
Expand ▾
Collapse ▴
Directories
¶
cmd
Package main runs a gRPC server running the proto/rpc/examples/fileupload/v1 service.
Package main runs a gRPC server running the proto/rpc/examples/fileupload/v1 service.
Click to show internal directories.
Click to hide internal directories.