Saturday 29 September 2018

socket.io


reference:
https://www.youtube.com/watch?v=FvArk8-qgCk&list=PL4cUxeGkcC9i4V-_ZVwLmOusj8YAUhj_9&index=5
https://www.youtube.com/watch?v=tHbCkikFfDE&t=1909s
https://codeburst.io/isomorphic-web-app-react-js-express-socket-io-e2f03a469cd3
https://blog.cloudboost.io/creating-a-chat-web-app-using-express-js-react-js-socket-io-1b01100a8ea5

broadcast to single client
https://socket.io/docs/rooms-and-namespaces/
https://stackoverflow.com/questions/11484418/socket-io-broadcast-to-certain-users

Deploying Node.js and Socket.io App to Heroku
http://robdodson.me/deploying-your-first-node-dot-js-and-socket-dot-io-app-to-heroku/
https://devcenter.heroku.com/articles/node-websockets

Connecting to a specific Server Ip with Socket.io
https://stackoverflow.com/questions/22915149/connecting-to-a-specific-server-ip-with-socket-io

Get static IP address for Heroku app
https://serverfault.com/questions/871875/get-static-ip-address-for-heroku-app/871878
https://devcenter.heroku.com/articles/fixie

WebSockets vs REST
https://www.pubnub.com/blog/2015-01-05-websockets-vs-rest-api-understanding-the-difference/

start server and client simultaneously from 1 command window
https://stackoverflow.com/questions/30950032/how-can-i-run-multiple-npm-scripts-in-parallel

Use a package called concurrently.
npm i concurrently --save-dev
Then setup your npm run dev task as so:
"dev": "concurrently --kill-others \"npm run start-watch\" \"npm run wp-server\""

No comments:

Post a Comment