e-specific

command module
v0.0.0-...-31fac03 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 2, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

README

SSE Example: Sending Specific Messages to Users

This example demonstrates how to send specific messages to users based on their email address. Users can register and receive personalized messages from the server.

How to Run?

  • Install Go on your computer.
  • Run the main.go file with Go: go run main.go
  • Open the index.html file in a web browser.
  • Register with your username and email address.
  • Click the "Try" button.

What it Does?

Users can register with the server using their email address. The server sends an SSE event containing a random message every 5 seconds. Events are only sent to registered users and are personalized based on each user's email address.

Note: In this example, authentication is implemented without tokens for simplicity. In a real-world application, it is important to use a more secure authentication mechanism.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL