Originally based off of this tutorial (outdated). This project uses Starscream to handle socket connections.
- Install node if you don't have it.
- Open a terminal window and cd into the project directory then run
npm install websocket
. cd nodeapp
.node chat-server.js
.- See something along the lines of "Fri Feb 21 2020 11:49:06 GMT-0500 (Eastern Standard Time) Server is listening on port 1337".
- In the nodeapp folder open
frontend.html
this will launch the server in your browser. Enter a name and send a message. - Open a terminal window and cd into the project directory then run
pod install
. - Open
SocketDemo.xcworkspace
with Xcode. - Run the app.
- Enter your name.
- Send a message using the app or the webpage previously opened, both should update in real time and display the conversation.