--- url: "https://grpc.io/docs/platforms/web/quickstart/" titulek: "Quick start | Web | gRPC" h1: "Quick start" popis: "This guide gets you started with gRPC-Web with a simple working example." jazyk: "en" kanonicka: "https://grpc.io/docs/platforms/web/quickstart/" drobecky: ["Docs", "Platforms", "Web", "Quick start"] zdroj: "live" wayback_snapshot: "" stazeno: "2026-09-13 20:59:52" znaku: 3794 slov: 391 kodovani: "utf-8" sha256: "38f2a9bd3d71749eebec46239ba9d581ea019fdfcdb0e2825a0b4677a7647bdd" --- # Quick start This guide gets you started with gRPC-Web with a simple working example. Contents # Quick start This guide gets you started with gRPC-Web with a simple working example. ### Prerequisites - Docker and `docker-compose` supporting [Docker Compose file version 3](https://docs.docker.com/compose/compose-file/compose-versioning). For installation instructions see [Install Compose](https://docs.docker.com/compose/install/#install-compose). ### Get the example code The example code is part of the [grpc-web](https://github.com/grpc/grpc-web) repo. 1. [Download the repo as a zip file](https://github.com/grpc/grpc-web/archive/master.zip) and unzip it, or clone the repo: `git clone https://github.com/grpc/grpc-web` 2. Change to the repo’s root directory: `cd grpc-web` ### Run an Echo example from your browser! From the `grpc-web` directory: 1. Fetch required packages and tools: `docker-compose pull prereqs node-server envoy commonjs-client` NoteGetting the following warning? You can ignore it for the purpose of running the example app:`WARNING: Some service image(s) must be built from source` 2. Launch services as background processes: `docker-compose up -d node-server envoy commonjs-client` 3. From your browser: You’ll see your message echoed by the server below the input box. - Visit [localhost:8081/echotest.html](http://localhost:8081/echotest.html) . - Enter a message, like “Hello”, in the text-input box. - Press the **Send** button. Congratulations! You’ve just run a client-server application with gRPC. Once you are done, shutdown the services that you launched earlier by running the following command: ``` docker-compose down ``` ### What is happening? This example app has three key components: 1. `node-server` is a standard gRPC server, implemented in Node. This server listens at port `:9090` , and implements the app’s business logic (echoing client messages). 2. `envoy` is the Envoy proxy. It listens at `:8080` and forwards the browser’s gRPC-Web requests to port `:9090` . 3. `commonjs-client` : this component generates the client stub class using the `protoc-gen-grpc-web` protoc plugin, compiles all the JS dependencies using `webpack` , and hosts the static content ( `echotest.html` and `dist/main.js` ) at port `:8081` using a simple web server. User messages entered from the webpage are sent to the Envoy proxy as gRPC-web requests. ### What’s next - Work through the [Basics tutorial](../basics/) . Last modified November 25, 2024: [feat: move the $ shell line indicator to scss (#1354) (ab8b3af)](https://github.com/grpc/grpc.io/commit/ab8b3af6ddfccb1995e1a06367593b14972aaf4b) [View page source](https://github.com/grpc/grpc.io/tree/main/content/en/docs/platforms/web/quickstart.md) [Edit this page](https://github.com/grpc/grpc.io/edit/main/content/en/docs/platforms/web/quickstart.md) [Create child page](https://github.com/grpc/grpc.io/new/main/content/en/docs/platforms/web/quickstart.md?filename=change-me.md&value=---%0Atitle%3A+%22Long+Page+Title%22%0AlinkTitle%3A+%22Short+Nav+Title%22%0Aweight%3A+100%0Adescription%3A+%3E-%0A+++++Page+description+for+heading+and+indexes.%0A---%0A%0A%23%23+Heading%0A%0AEdit+this+template+to+create+your+new+page.%0A%0A%2A+Give+it+a+good+name%2C+ending+in+%60.md%60+-+e.g.+%60getting-started.md%60%0A%2A+Edit+the+%22front+matter%22+section+at+the+top+of+the+page+%28weight+controls+how+its+ordered+amongst+other+pages+in+the+same+directory%3B+lowest+number+first%29.%0A%2A+Add+a+good+commit+message+at+the+bottom+of+the+page+%28%3C80+characters%3B+use+the+extended+description+field+for+more+detail%29.%0A%2A+Create+a+new+branch+so+you+can+preview+your+new+file+and+request+a+review+via+Pull+Request.%0A) [Create documentation issue](https://github.com/grpc/grpc.io/issues/new?title=Quick%20start) [Create project issue](https://github.com/grpc/grpc.io/issues/new)