Client will be streaming collection of data. My server will be listening to it. It will draw a diagram by using that x,y cordinates. Both servers are node servers and running on AWS ubntu os.
- Connect to the client-server aws instance.
ssh -i "node-client.pem" ubuntu@ec2-3-85-165-234.compute-1.amazonaws.com
- Go to the client server folder
cd xy-cordinates/
- Run the client-server.js file.
node client-server.js
This will run the server on port 8080 and see the result from this url
http://3.85.165.234:8080/random-coordinates
- Connect to the server aws instance
ssh -i "node-client.pem" ubuntu@ec2-3-89-123-236.compute-1.amazonaws.com
5.Go to the client server folder
cd xy-cordinates/
6.Run the node server-nodb.js file.
node server-nodb.js
This will run the server on port 3000 and see the result from this url
- Copy http://3.85.165.234:8080/random-coordinates and paste it in the server-nodb.js file if it was changed and push it to the server as follows.
scp -i /Users/pramodaya/Desktop/project/node-client.pem server-nodb.js ubuntu@ec2-3-89-123-236.compute-1.amazonaws.com:/home/ubuntu/xy-cordinates