mdn / samples-server

MDN samples server; used for samples that can't be hosted in-place on MDN, plus back-end server-side code for samples that need it.
https://developer.mozilla.org/
Creative Commons Zero v1.0 Universal
957 stars 931 forks source link

wsServer.on('request', function(request)) #55

Open 0422ys opened 6 years ago

0422ys commented 6 years ago

I typed "node chatserver.js" to start the server. Is this right?

If so, how can I confirm if the 'request' is received on the server side?

jgshin1109 commented 6 years ago

@a2sheppy I have same Issue. I have http server. should i change http server to https server?

a2sheppy commented 5 years ago

So yes, node chatserver.js should start it up. I've just updated the code so it's all up to date, so hopefully any problems are fixed if you've been having any.

Once you start it up, just open a browser and navigate to the site. If you're running it locally, you may have problems depending on how your machine is set up to deal with the SSL issue, and you'll have to update it to use valid keys. However, you can also just tweak it to use an http server instead for local use. Making that easier to do is something I think probably needs to be done in the future.

The webrtc-from-chat example, for instance, has commented-out bits here and there that you can swap in to change to HTTP (mostly; it's more involved than that but only barely).