Skip to content

Commit

Permalink
review suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
HomelessDinosaur committed Oct 15, 2024
1 parent d5bd34e commit 04eaddd
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions docs/guides/go/realtime-messaging.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title_seo: Building your first WebSocket Application with Go and Nitric
description: Use the Nitric framework to easily build and deploy Go WebSocket applications for AWS, Azure or Google Cloud.
description: Use the Nitric framework to easily build and deploy Go WebSocket applications for AWS.
tags:
- Realtime & Websockets
- Key Value Store
Expand Down Expand Up @@ -140,7 +140,7 @@ ws.On(websockets.EventType_Message, func(ctx *websockets.Ctx) {
if err != nil {
return
}

senderId := ctx.Request.ConnectionID()

for {
Expand Down Expand Up @@ -239,7 +239,14 @@ Do a quick `go mod tidy` to make sure all new dependencies are resolved.

## Ok, let's run this thing!

Now that you have your WebSocket application defined with handlers for each event, it's time to test it locally.
Now that you have your WebSocket application defined with handlers for each event, it's time to test it locally. Update your `nitric.yaml` to point to the service at `websockets/main.go`:

```yaml
services:
- match: websockets/*
runtime: go
start: go run ./$SERVICE_PATH
```
```bash
nitric start
Expand All @@ -265,7 +272,10 @@ Continue by checking your stack file `nitric.dev.yaml` and adding in your prefer

### AWS

Note: You are responsible for staying within the limits of the free tier or any costs associated with deployment.
<Note>
You are responsible for staying within the limits of the free tier or any
costs associated with deployment.
</Note>

We called our stack `dev`. Let's try deploying it with the `up` command:

Expand Down

0 comments on commit 04eaddd

Please sign in to comment.