GitXplorerGitXplorer
p

grpc-js-example

public
0 stars
0 forks
0 issues

Commits

List of commits on branch master.
Verified
1d7cb2ee19e5c5d805c94b536e720932d59f2864

feat(doc): add note about force adding new proto files

ppauldesmondparker committed a year ago
Verified
8e7e18a81742cafee7de99f1eb298a43facc7ae9

feat(doc): add note about grpc file generation and ts-node use.

ppauldesmondparker committed a year ago
Verified
f8abe135a72581db407190810d1e923fb901ff35

initial commit

ppauldesmondparker committed a year ago
Verified
5be95c3ec2d8ae7809b2b3ba92916ba51dc94e73

Initial commit

ppauldesmondparker committed a year ago

README

The README file for this repository.

Simple @grpc Example

Last Update: 20230823

[!Note] Based on https://www.youtube.com/watch?v=iq2z7xw8VmE

Setup

[!Note] This repository does not include ANY code that can be generated. Therefore, for the example to work, you must first generate the grpc ts files with pnpm proto:gen.

[!Warning] Adding new files to the proto/ directory will not show up in unstaged files, you'll need to git add -f proto/new.proto to force add a new hypothetical proto file.

[!Important] Do NOT add any generated files in the proto/ directory. They are ignored for a reason. As a rule of thumb, do not add any .ts files in this directory.

# Install all dependencies
pnpm i
# Generate all ts files from proto/*.proto
pnpm proto:gen

Execution

pnpm startserver  # Use a separate pane/window
pnpm startclient

Notes

tsconfig.json

[!Note] Notice that there's no tsconfig file. For some reason, at present, ts-node doesn't work with any setup that I tried. Ref: https://github.com/TypeStrong/ts-node/issues/1007

[!Note] Using ts-node with no tsconfig.json works with no issue.