R
Railway•16mo ago
SrGobi

Change Heroku to Railway

I need more info because I have a problem with Heroku with my hosted proyect there WebSocket doesnt load and doesnt work, If i host my proyect here that problem would be solved?
29 Replies
Percy
Percy•16mo ago
Project ID: N/A
SrGobi
SrGobiOP•16mo ago
N/A
jonbeau
jonbeau•16mo ago
without knowing the specific issues you faced with heroku, what i can say is this; i have an app with websockets working on railway currently.
SrGobi
SrGobiOP•16mo ago
Good fellows I'm having a strange problem with a project that uses WebSocket a server, an API and the discord bot system in conjunction with a front in Angular15 and hosted on Heroku, with the domain purchased in Google domains and managing DNS and other security in CloudFlare which in turn connects the DNS of Heroku and SSL, for now the thing is that the WebSocket to be used in HTTPS needs the certificate and the key that I have already put them of the Certificates of origin of CloudFlare to add them manually has Heroku so that this does not block me the SSL since being HTTP if it works correctly but practically disabling the security of cloudflare, then I need to manually manage the SSL to be able to include them in my server of origin (WebSocket) and in turn to be accepted by Heroku had the automatic SSL
Brody
Brody•16mo ago
railway has automatic ssl, and without knowing the issue you faced with heroku, what I can say is this, I also have an app with websockets that works perfectly on railway so my advice will be, move your app over to railway first, if you encounter issues, come back here and we will work through any possible issues together
SrGobi
SrGobiOP•16mo ago
Why the system takes so long to verify my custom domain?
Brody
Brody•16mo ago
no pings please #🛂|readme #5
SrGobi
SrGobiOP•16mo ago
Sorry, but look at the image, it is already configured in Cloudflare and I have also seen the documentation for it. https://docs.railway.app/deploy/exposing-your-app
Brody
Brody•16mo ago
when you use a cloudflare proxy it prevents railway from checking that the cname has been set correctly, there's no need to worry your domain works fine and yes I know the screenshot shows a green checkmark on a cloudflare proxied domain, it's irrelevant as long as the domain works, and it does
SrGobi
SrGobiOP•16mo ago
But why does it take so long? I have to wait 72 hours to be able to put the websoket then? since I can't give wss the url: https://web-production-d1d3.up.railway.app/ but it has to be: https://espcustoms.xyz/
Brody
Brody•16mo ago
like I just said, your domain already works I have been to your site, no issues whatsoever you can proceed with whatever you where doing with websockets now
SrGobi
SrGobiOP•16mo ago
Right, sorry, I just got in, thank you very much, now I can. ('wss://espcustoms.xyz')
Brody
Brody•16mo ago
yep that would be the correct scheme for websockets over https but do let me know if you run into any more issues
SrGobi
SrGobiOP•16mo ago
It seems that I have a problem but now I do not get WebSocket failure, but things do not load, could we communicate privately?
Brody
Brody•16mo ago
curious as to what could be achieved privately that can't be achieved in this thread
SrGobi
SrGobiOP•16mo ago
I was wondering if we could make a call, so that the feedback would be instantaneous.
Brody
Brody•16mo ago
sorry I'm not gonna do that you are aware i don't work for railway right?
SrGobi
SrGobiOP•16mo ago
Well you could give the permissions to my partner who is trying to verify with github and connect the bot with it, but he gets an error, is that my partner speaks English better than me and besides so I can continue doing checks.
Brody
Brody•16mo ago
^
SrGobi
SrGobiOP•16mo ago
aaahh sorry :/
Brody
Brody•16mo ago
but that doesn't really matter in this situation, nothing here has yet to require someone from the team step in your partner would need to upgrade to the hobby plan, the hobby plan has no verification requirements
SrGobi
SrGobiOP•16mo ago
Well, I tell you, I have a discord bot project that contains a server for api use, the new websocket and a dashboard generated with angular15, this dashboard has a service system in which I manage the endpoints of the API and now the WebSockets, the whole dashboard is generated a file code with the configuration of 'ng build --configuration production' and saved in a 'dist' to which I will pass you the Dashboard WebSocket service system and the server. ts of the main project that uses routers and so on:
Brody
Brody•16mo ago
don't you need to register the websocket on a specific endpoint? like /events or something? okay well you said it doesn't work right?
SrGobi
SrGobiOP•16mo ago
Then you think I should include an endpoint to 'this.socket$ = webSocket('wss://espcustoms.xyz');' Correct. Things that are connected to WebSocket do not load.
Brody
Brody•16mo ago
then I think you should start showing me some errors lol you gotta show me something "does not load" is not all that useful on its own
SrGobi
SrGobiOP•16mo ago
With the same database (MongoDB) if it loads locally, for example you can see on the top right and bottom left the theme that there are more things, (In the darker left bar do not look too much because that is the bot servers and I'm using the ofical and test therefore are on different servers).
Brody
Brody•16mo ago
I see errors in the console logs but check if the websocket connection was successful in the network logs I think it's important to state that this is only a code issue, not an issue with railway railway runs your code as is after all
SrGobi
SrGobiOP•16mo ago
Wait I think I found the error I am using on local the wss of espcustoms.xyz on local but the endpoint was local on both main and localhost may be because localhost:3000 can not be on main: this.socket$ = webSocket('wss://espcustoms.xyz'); executed correctly on local. endpoint: 'http://localhost:3000/api', executed correctly on local if I change this to https://espcustoms.xyz/api for the main you think it will work??
Brody
Brody•16mo ago
i do not know what endpoint your websocket is registered to, but you would still need to use wss
Want results from more Discord servers?
Add your server