a year ago
Hi, im trying to do a simple app using websocket and trying to test it with an online client tester https://piehost.com/websocket-tester, below are my code:
```const PORT = process.env.PORT || 3003;
const PUBLICDOMAIN = process.env.RAILWAYPUBLIC_DOMAIN;
const httpsServer = https.createServer(app);
const webSocketServer = new WebSocket.Server({ port: PORT })
httpsServer.listen(() =>
{
console.log(Server running on port ${PORT});
console.log(WebSocket URL: wss://${PUBLIC_DOMAIN});
});```
When i tried to connect to the url wss://.....[railway.app](railway.app) as pasted below it simply said i failed.
Many thanks! Im on the Free Trial plan also.
5 Replies
a year ago
hello,
please see our docs on this topic -
a year ago
awsome!
a year ago
!s
Status changed to Solved brody • about 1 year ago