https://github.com/emcfarlane/lark-next
Nextjs and larkingio demo
https://github.com/emcfarlane/lark-next
Last synced: over 1 year ago
JSON representation
Nextjs and larkingio demo
- Host: GitHub
- URL: https://github.com/emcfarlane/lark-next
- Owner: emcfarlane
- Created: 2022-05-02T22:35:36.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-06-18T17:50:40.000Z (about 4 years ago)
- Last Synced: 2024-04-21T00:58:21.068Z (about 2 years ago)
- Language: TypeScript
- Size: 161 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This is a [Next.js](https://nextjs.org/) project bootstrapped with
[`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app)
with backend server written with [larking.io](https://larking.io) go libraries.
It demo's the gRPC-web intergration with typescrupt support. Libraries use:
- [ts-proto](https://github.com/stephenh/ts-proto) - library for generating protobuffers.
- [@improbable-eng/grpc-web](https://www.npmjs.com/package/@improbable-eng/grpc-web) - client library for gRPC-Web transport.
- [swr](https://www.npmjs.com/package/swr) - hooks library for data fetching.
## Getting Started
Please see docs, or get in touch for support and feedback!
First, run the development server:
```bash
npm run dev
```
Then, run the backend server:
```bash
go run ./cmd/tutorial
```
### Build
Generate protobuffers:
```
protoc --go_out=paths=source_relative:. --go-grpc_out=paths=source_relative:. --ts_proto_out=outputClientImpl=grpc-web:. --ts_proto_opt=esModuleInterop=true,useDate=string ./apipb/*.proto
```