R
Railway13mo ago
Kapatid

How to connect to my Soketi project in Railway

Based on the example of using Pusher in the website soketi.app, how do I get the wsHostand wsPort after deploying the Soketi template in Railway? My project that will be connecting to this Soketi is a create-t3-app.
let client = new PusherJS('app-key', {
wsHost: '127.0.0.1',
wsPort: 6001,
forceTLS: false,
encrypted: true,
disableStats: true,
enabledTransports: ['ws', 'wss'],
})
let client = new PusherJS('app-key', {
wsHost: '127.0.0.1',
wsPort: 6001,
forceTLS: false,
encrypted: true,
disableStats: true,
enabledTransports: ['ws', 'wss'],
})
soketi
soketi
Soketi is your simple, fast, and resilient open-source WebSockets server. 📣
Solution:
wsHost: '0.0.0.0',
wsPort: process.env.PORT | 6001,
wsHost: '0.0.0.0',
wsPort: process.env.PORT | 6001,
...
Jump to solution
7 Replies
Percy
Percy13mo ago
Project ID: d740978b-74b7-426a-8f52-07ff6d546ac8
Kapatid
Kapatid13mo ago
d740978b-74b7-426a-8f52-07ff6d546ac8
Solution
Brody
Brody13mo ago
wsHost: '0.0.0.0',
wsPort: process.env.PORT | 6001,
wsHost: '0.0.0.0',
wsPort: process.env.PORT | 6001,
Kapatid
Kapatid13mo ago
Do I need to also host my create-t3-app in Railway because currently it is deployed in Vercel
Brody
Brody13mo ago
you can host your app wherever you want that's up to you
Kapatid
Kapatid13mo ago
Ok I will try to use these values I just realized this how do I run my Soketi in my local machine? I have docker but when I run nixpacks build it tells me
Nixpacks was unable to generate a build plan for this app.
Please check the documentation for supported languages: https://nixpacks.com

The contents of the app directory are:

Dockerfile
README.md
Nixpacks was unable to generate a build plan for this app.
Please check the documentation for supported languages: https://nixpacks.com

The contents of the app directory are:

Dockerfile
README.md
Brody
Brody13mo ago
ah yes good point process.env.PORT | 6001 that way when there's no environment variable PORT it will fallback to 6001 if you are using a dockerfile you have to use the docker builder, nixpacks has nothing to do with building images starting from dockerfiles