This is a simple web application that demonstrates a counter service using gRPC-Web and Svelte. The server is implemented in Go, and the client is a Svelte application.
- Increment a global counter on the server.
- Multiple clients can connect and see the updated counter value.
- Go 1.16+
- Node.js 14+
- Navigate to the project root directory.
- Run the server:
The server will start on port
go run server.go
8080
.
- Navigate to the
svelte-client
directory:cd svelte-client
- Install the dependencies:
npm install
- Start the development server:
The client will be served on
npm run dev
http://localhost:5000
.
- Open
http://localhost:5000
in your web browser. - Click the "Increment Counter" button to increment the counter value on the server.
- The server uses gRPC-Web to communicate with the client.
- Ensure both server and client are running to see the application in action.