SHARE

Hey gang, in this websockets tutorial I’ll be showing you how to get a very simple express app up and running on Node.js, ready for working with websockets.

—– COURSE LINKS:
+ Repo – https://github.com/iamshaunjp/websockets-playlist
+ Atom editor – https://atom.io/a
+ Download Node – https://nodejs.org/en/
+ Socket.io – https://socket.io
———————————————————————————————
Related tutorials:

—– NODE.JS TUTORIALS
https://www.youtube.com/playlist?list=PL4cUxeGkcC9gcy9lrvMJ75z9maRw4byYp

—– SUBSCRIBE TO CHANNEL – https://www.youtube.com/channel/UCW5YeuERMmlnqo4oq8vwUpg?sub_confirmation=1

============== The Net Ninja =====================

For more front-end development tutorials & to black-belt your coding skills, head over to – https://www.youtube.com/channel/UCW5YeuERMmlnqo4oq8vwUpg or http://thenetninja.co.uk

================== Social Links ==================

Twitter – @TheNetNinja – https://twitter.com/thenetninjauk

18 COMMENTS

  1. after installing nodemon, then typing "nodemon index", it didn't work, any idea what i did wrong? my also appears to not be working since the browser tells me "unable to connect to server", could this be linked to the nodemon thing?

  2. for those searching for the CSS

    body {
    font-family: 'Nunito';
    }

    h2 {
    font-size: 18px;
    padding: 10px 20px;
    color: #575ed8;
    }

    #mario-chat{
    max-width: 600px;
    margin: 30px auto;
    border: 1px solid #ddd;
    box-shadow: 1px 2px 5px rgba(0,0,0,0.05);
    border-radius: 2px;
    }

    #chat-window{
    height: 400px;
    overflow: auto;
    background: #f9f9f9;
    }

    #output p{
    padding: 14px 0px;
    margin: 0 20px;
    border-bottom: 1px solid #e9e9e9;
    color: #555;
    }

    label{
    box-sizing: border-box;
    display: block;
    padding: 10px 20px;
    }

    input {
    padding: 10px 20px;
    box-sizing: border-box;
    background: #eee;
    border: 0;
    display: block;
    width: 100%;
    background: #fff;
    border-bottom: 1px solid #eee;
    font-family: Nunito;
    font-size: 16px;
    }

    button{
    background: #575ed8;
    color: #fff;
    font-size: 18px;
    border: 0;
    padding: 12px 0;
    width: 100%;
    border-radius: 0 0 2px 2px;
    }

  3. I can't get past the 'nodemon index' part of the tutorial.
    I get this error in cmder:

    C:UserskdsilvaDesktopKDCodingWebsocketsTutorial ([email protected])
    λ nodemon index
    [nodemon] 1.11.0
    [nodemon] to restart at any time, enter `rs`
    [nodemon] watching: .
    [nodemon] starting `node index index.js`
    events.js:160
    throw er; // Unhandled 'error' event
    ^

    Error: spawn cmd ENOENT
    at exports._errnoException (util.js:1018:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
    at onErrorNT (internal/child_process.js:367:16)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9)

  4. Thank You Sir for all this tutorials. Just wanted to know how can i create a same chat app on godaddy. I have my website running there and i wanted to create a chat app on my site.

  5. hey ninja, whenever I type nodemon index the console says: bash: nodemon: command not found.

    but I added a line in my pacakge.json file ("start": "nodemon index.js")
    and type npm start then it works
    can you tell me whhy this happened?

LEAVE A REPLY

Please enter your comment!
Please enter your name here