I've installed kurento media server locally using docker, and created a Node.js app to communicate with it.
I have two types of clients, presenter clients & viewer clients.
Everything works on the local environment using self signed SSL certificate, I can also connect from other devices on local network.
Now I want to make it work from AWS, I created CloudFormation stack using template file, from kurento installation guide, and deployed my Node.js server to a different EC2 instance.
The problem is that the video doesn't play on viewer clients.
The communication with Node.js app works the same as in local & sdpAnswer arrives.
My first guess was that it's a certificate error, so I linked my domain to CloudFlare, and used its SSL service.
But the video still doesn't play.
Also, I checked The TURN server, that the template created, it seems to be working:
All ports are currently open on both EC2 instances.
What am I missing here? And how could I troubleshoot it?
Thanks in advance :)
If anyone is interested, in my case I forgot to call:
webRtcPeer.addIceCandidate(candidate);
In my client side app, when candidates arrived from server.
Related
I just learned CSR and SSR. So CSR is rendered in browser and
SSR is rendered in server and gives it to browser.
I can understand what CSR means but in SSR, what is the server?
Is it a big database like AWS? or just small codes stuff in npm?
I can't understand exactly what server means.
Anybody could help me?
Fundamentally, a server is just a computer with a program on it configured to respond to network requests. Often such a server's network configuration allows it to be reached from the public internet (with an IPv4 address and hostname). It can be as small or large as you want. You could use a hosted server (or hosted service provider) with a huge infrastructure like AWS; you could also use a spare computer lying around, install a backend on it (Node.js? Next.js? PHP? Etc...) and hook it up to your network, and it'll also function as a server.
There are also local development servers. These are pieces of software running on your local machine that allow you, the developer (and usually only you) to run server code while testing. These are usually accessible by plugging a localhost URL into your web browser, such as localhost:3000.
In SSR, 'the server' is usually the web server which contains the HTML files, but it can also be a separate server, such as with bigger websites that may have dedicated file storage servers, and rendering servers. Either way, the server is always just a computer owned by the website owners, which sends stuff over when someone asks it to.
I recently made a website but I had a doubt about how to make my laptop work as a server and after deploying if I shut down my laptop will the website work the same manner and give data to database in mongodb cloud atlas or will it show website not reached if it does please solve my doubt and give me a solution
If you're not running the node.js server then your website will not be accessible.
Why not deploy to the cloud like Heroku?
if your site is deployed on your machine it will no longer be accessible if you are disconnected from the internet network in any way.
I use the example for the chat server in ReactPHP. My server listens on port 8080
$socket = new React\Socket\Server(8080, $loop);
$server->listen($socket);
in my local PC. The written code is working correctly but when upload files into my Linux host, nothing works. I wrote a ticket to the support team from my hoster, they said that this is not possible in Linux. Is that correct?
ReactPHP core team member here. Your run-of-the-mill shared hosting won't be able to host this. You need your own server, VPS, or bare metal, to run ReactPHP as a server because you're dealing with a daemon process. And shared hosting generally doesn't support that.
My suggestion is to get a VPS somewhere and look into Supervisor to keep your process running and restart it when something happens to it. This also requires you to manage your own server with all the firewalling and networking knowledge that comes with it.
I have developed website in react and node.js as intermediary to send and receive response.
Now i want to put this on a machine in lab , so everyone can access it.
Can i Install node on machine in lab and run same setup as on my dev machine and give ip of that server?
I tried searching deployment with node js an react, but everyone using AWS, or some external server after npm build.
How do I deploy my react app on lab machine with out actually copying code?
Two Things before you share your IP and PORT:
Have a process monitor setup in your lab machine, Check out pm2. This will help you run your application in the background,
monitor your application and start your application after restart.
Enable port in your firewall for everyone to use. if your lab system is Ubuntu then allow ufw for the port.
Now you can share your IP:PORT and everyone would be able to access it, provided they all are connected to the same network.
If you want everybody access your server, you can share your private IP with them, so others can access it using
yourip:port
I know this isnt coding but i dont know where else to look.
So I've written a chat bot using node.js and the socket.io-client module. Basically it's just a program that auto responds to messages on a chat room also written with node.js. The problem I have is hosting it. I have hosted it on my raspberry pi which works perfectly but isn't ideal as I sometimes want my pi for other things and this bot runs 24/7.
So, I looked around for some free node.js hosting. I found c9.io, heroku and appfog but all of them expect you to host websites with node.js and so aren't setup for my needs. I need a single instance to be always running but these hosts constantly restart and terminate the program causing all sorts of problems for me which wouldn't really be an issue if it was just outputting a web page.
So, is there anywhere that is suitable for hosting a node.js app like mine?
Have Amazon host it for you. That's what I'm doing with one of my projects. Just create an instance, I used Ubuntu for my OS, then installed Node.js and was good to go.
My recommendation will be to host it on openshift
https://www.openshift.com/app/account/new
Heroku is also widely used but in their free tier your bot has to "sleep" 6 hours
https://www.heroku.com/