p8ul / java-spring-boot-websocket

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Spring boot Web-socket playground

Screenshot

Getting Started

To get a local copy up and running follow these simple example steps.

Prerequisites

This is an example of how to list things you need to use the software and how to install them.

  • java v11+

Installation

  1. Clone the repo
    git clone https://github.com/p8ul/java-spring-boot-websocket-playground.git
  2. Install packages
    mvn install

Usage

Run WebsocketsdemoApplicataion then open your browser and navigate to http://localhost:8080

You can send an message by entering a text on the message input and clicking send button or use send a request to localhost:8080/send-message

curl --location --request POST 'localhost:8080/send-message' \
--header 'Content-Type: application/json' \
--header 'Cookie: csrftoken=od0BPOSlRpUHEeWOa6QaedIOuCId7MHx7zbQBSGRCfTRCyb8DwMzU0Wu6Z26IW38; sessionid=eyuamddu7tvnni6wvsxux8y96dxzhgvq' \
--data-raw '{
    "messageContent": "world"
}'

About


Languages

Language:Java 63.9%Language:HTML 24.7%Language:JavaScript 11.4%