I try to create a simple server stomp for testing my angular client but my server not working correctly. Could someone tell me where I'm wrong in creating this server?
this is my configuration
NodeJs Server:
var http = require("http");
var StompServer = require("stomp-broker-js");
var server = http.createServer();
var stompServer = new StompServer({ server: server });
server.listen(8088);
stompServer.on("connecting", function () {
console.log("CONNECTING");
});
stompServer.on("connected", function () {
console.log("connected");
});
stompServer.subscribe("/**", function (msg, headers) {
var topic = headers.destination;
console.log(topic, "->", msg);
});
stompServer.send("/test1", {}, "testMsg1");
when i try to ping this by postman the result is :
Could not connect to ws://localhost:8088 09:44:49 Error: Unexpected server response: 400 Handshake Details Request URL: http://localhost:8088/ Request Method: GET Status Code: 400 Bad Request Request Headers Sec-WebSocket-Version: 13 Sec-WebSocket-Key: 79B0dcS2OJ6l1w1GBli6yg== Connection: Upgrade Upgrade: websocket Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits Host: localhost:8088 Response Headers Connection: close Content-type: text/html Content-Length: 11