-
Run backend services:
mvn clean install docker build -t spring-xmpp-websocket-server . docker-compose up -
Go to
http://localhost:9090and setup openfire XMPP server:- Server settings:
- Set "XMPP Domain Name" to
localhost - Set "Server Host Name (FQDN)" to
localhost - Leave the rest as it is.
- Set "XMPP Domain Name" to
- Database Settings:
- Select "Standard Database Connection"
- Select "MySQL"
- Replace on the "Database URL"
HOSTNAMEwithopenfire-mysqlandDATABASENAMEwithopenfire, then fill in the username and password.
- Continue and ignore the rest of the steps.
- Server settings:
-
Now you can use a websocket client to try out the backend application.
- Endpoint: ws://localhost:8080/chat/sergio/pass
- Connect will return
{"messageType":"JOIN_SUCCESS"} - Send new message with body:
will return
{ "from": "sergio", "to": "jose", "content": "hello world", "messageType": "NEW_MESSAGE" }{"from":"sergio","to":"jose","content":"hello world","messageType":"NEW_MESSAGE"}
-
Run ReactJS App
npm install
npm startTo run tests, run the following command
mvn clean install