Category Archives: Programming

NGINX as a Proxy for Websockets

NGINX supports WebSocket by allowing a tunnel to be set up between a client and a backend server. For NGINX to send the Upgrade request from the client to the backend server, the Upgrade and Connection headers must be set explicitly, as in this example: Building the Websocket Server Initialize your Node.js App and install […]

Introduction to React.JS 2024

Creating Components Create a file HelloThere.jsx in the sub directory components: This component can be imported into App.jsx and rendered by: Working with Props Content Projection Conditional Rendering Loops Events State and Reducer Hooks Effects – Lifecycle for Functional Components No Dependencies An empty Array Update when component did mount: Props or State Values Update […]

Introduction to Websockets

TCP & UDP in Node.js TCP Server You can run this file in Node.js: And connect to it using Telnet: Everything you type after that will be logged in your server console. UDP Server HTTP in Node.js Run node http.js and open the page inside your web browser or run the following from your Terminal: […]

Web3.js Blockchain Application

Web3.js is a collection of libraries that allow you to interact with a local or remote Ethereum node using HTTP, IPC, or WebSocket. Web3.js can be used in the frontend or backend of an application to read data from the blockchain. Blockchain authentication can be used to protect application with public data. It helps identify […]