Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/rakaziwi/real-time-chat-api

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/rakaziwi/real-time-chat-api

  • v0.0.0-20200506072412-c30d64914da2
  • Source
  • Go
  • Socket score

Version published
Created
Source

real-time-chat-api

Golang real time chat api and it's web chat interface

Before start this go application, please make sure this requirement installed

  1. Golang - https://golang.org/doc/install
  2. Download required go packages by running these command in root of project folder
go get github.com/gorilla/mux
go get github.com/gorilla/websocket
  1. Run the application with this command in root of project folder
go run main.go

The application will run at localhost at port 8000, so make sure the port 8000 is not used

You can access this application using two ways, with browser and api. I created the web page to show the send message api function is working in real time. You also can join the chat with your own username and send message in the web and to see get all sent message api is working.

To use the api:

  1. Get all sent message
curl --location --request GET 'localhost:8000/api/messages'
  1. Send message
curl --location --request POST 'http://localhost:8000/api/messages' \
--header 'Content-Type: application/json' \
--data-raw '{
	"message": "Hey, this is my first golang application!"
}'

FAQs

Package last updated on 06 May 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc