Tag Archives | Websocket

How to create websocket secure by using NodeJS

Method 1: In this article: How to run a https website with Nodejs, express and socket.io Method 2: use NGINX file .conf Now, you can use websocket to create websocket secure: Read more: Example chat application using Nodejs + Socket.io Example chat application using Nodejs + ws Example chat application using Nodejs + Websocket

Read full story Comments { 0 }

How to run a https website with Nodejs, express and socket.io

Step 1: generate RSA key Use command line: (on Windows we can use Cygwin) Result: Step 2: create file csr.pem Result: Step 3: create SSL certificate file Result: Note: this is in practice, in production you must buy one certificate or use free SSL Step 4: continue with Nodejs app here an example app: app.js […]

Read full story Comments { 1 }

Example chat application using Nodejs + Websocket

Previous tutorial: Example chat application using Nodejs + Socket.io With Nodejs, we can create real-time application like chat-room. We can use Socket.io, WS or Websocket. Today, we introduce a simple chat application with Nodejs + Websocket Application structure: File index.html File chat-frontend.js File: chat-server.js Run: npm install websocket to install Websocket Run: node chat-server.js Go […]

Read full story Comments { 0 }