Skip to content

KarthikRaju391/go-nats-chat-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-nats-chat-server

This is a simple chat server developed in go using NATS.

Starting the Project

  1. Start the NATS service on Docker by running the following command: docker run -d -p 4222:4222 -p 8222:8222 -p 6222:6222 --name nats-server -ti nats:latest -js
  2. Run go run main.go
  3. Open any HTTP client(like Postman) and connect to the following WebSocket URL on two different tabs: ws://localhost:8080/chat/general
  4. Start sending messages with the following payload:
  {
    "text": "hello!"
  }

For a complete tutorial on how this works, check out my blog.

About

This is a simple chat server developed in go using NATS.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages