Skip to content

Add first draft script for video 21#9

Open
nateemerson wants to merge 2 commits intosynadia-io:mainfrom
nateemerson:nate/nats-overview-redux
Open

Add first draft script for video 21#9
nateemerson wants to merge 2 commits intosynadia-io:mainfrom
nateemerson:nate/nats-overview-redux

Conversation

@nateemerson
Copy link
Copy Markdown

No description provided.

Copy link
Copy Markdown
Contributor

@codegangsta codegangsta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This script is fantastic. Really well structured and to the point. Let's turn it into a video!

Hey everyone, my name is Nate and I like NATS! I'm a software architect who's
been building web applications and infrastructure for about 20 years. And I got a new job!

I recently joined Synadia as a DX engineer, where I'm excited to work on our web
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd consider putting this intro at the end instead of the beginning, like we went over in our call


js, err := nc.JetStream()
if err != nil {
fmt.Println(err)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure you log.Fatal here instead

"os"
"strings"

"github.com/nats-io/nats.go"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use the new jetstream api at github.com/nats-io/nats.go/jetstream

const messageInput = document.getElementById('message');
const sendButton = document.getElementById('send');

const socket = new WebSocket('ws://localhost:8080/ws');
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nats.ws

import {connect} from nats.js

const conn = await connect({server: "ws://localhost:4223"})

Additionally, show the user how to configure nats for websockets:

nats-server -c nats.conf

or

nats-server --websockets ????

refer to alberto for latest web recommendation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants