Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doesn't work on servers or using ngrok.exe over https #258

Open
diegosystem32 opened this issue May 17, 2023 · 5 comments
Open

doesn't work on servers or using ngrok.exe over https #258

diegosystem32 opened this issue May 17, 2023 · 5 comments

Comments

@diegosystem32
Copy link

Have a question?
doesn't work on https://render.com/ and does not work over https or mgrok.exe...

Describe the bug
doesn't work on https://render.com/ and does not work over https or mgrok.exe...

Have a question?
how to use it on https://render.com/, I have some APIs there to study, but geckos.io didn't work on https, it doesn't connect to the server, but it works on localhost, which way is right, or simple example code from configure for a server.?

how am i used Node 18, server.mjs:
`// listen on port 5000 (default is 9208)
const PORT = process.env.PORT || 10000;

//###without express###
import geckos, { iceServers } from '@geckos.io/server'
const io = geckos({
iceServers: process.env.NODE_ENV === 'production' ? iceServers : [],
multiplex: true,
cors: { allowAuthorization: true },
})

io.onConnection((channel) => { console.log('connected: ', channel.id)
io.listen(PORT)`

@diegosystem32
Copy link
Author

@yandeu

@yandeu
Copy link
Member

yandeu commented May 18, 2023

Are all required ports open?
https://github.com/geckosio/geckos.io#deployment

And do you have iceServers?
(In your case NODE_ENV set to production)
https://github.com/geckosio/geckos.io#ice-servers

@diegosystem32
Copy link
Author

diegosystem32 commented May 19, 2023

@yandeu thanks, I'm going to try to do that and change the env🙏, but even using it locally, and using ngrok.exe to expose my localhost and port, the same timeout error happens on the render.com site in the free version

@diegosystem32
Copy link
Author

diegosystem32 commented May 19, 2023

Are all required ports open? https://github.com/geckosio/geckos.io#deployment

And do you have iceServers? (In your case NODE_ENV set to production) https://github.com/geckosio/geckos.io#ice-servers

here the error:
image

client:
const channel = geckos({
url: 'https://b5d1-177-129-117-224.ngrok-free.app',
port: 5000
})

@diegosystem32
Copy link
Author

diegosystem32 commented May 23, 2023

@yandeu I can't run it in docker either

image

WORKDIR /usr/src/app

RUN apt update -yq && apt upgrade -yq

COPY package.json package-lock.json ./

RUN rm -rf node_modules
RUN npm install

COPY . .

ENV NODE_ENV=production

#EXPOSE 3000
EXPOSE 5000/tcp
EXPOSE 10000-10007/udp

CMD [ "npm", "start" ]`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants