express

Implement reCAPTCHA in htmx + expressjs

Implement reCAPTCHA in htmx + expressjs

Let's start with the most obvious question, why we need it? because reCAPTCHA is using advance risk analysis techniques to detect frau, thus protecting your websites or mobile app from fraudulent activities and security risks such as: Spam. Abuse. Credential stuffing1. Account takeover (ATO). Automated account creation. Password breach. Leak detection. Here we wana use Google's reCAPTCHA which I believe is the most popular out there: It has: Mobile app SDKs. Multi-factor authentication (MFA). It interacts with your: Backend. Clients (web pages or mobile applications). UX -- User journey So here is how our users probably use our app, well…
Read More
Building a High-Quality Stock Report Generator with Node.js, Express, and OpenAI API

Building a High-Quality Stock Report Generator with Node.js, Express, and OpenAI API

In this article, we will delve into creating a professional-grade stock report generator using Node.js, Express, and the OpenAI API. Our focus will be on writing high-quality, maintainable code while preserving the integrity of the prompt messages used in the OpenAI API interactions. The application will fetch stock data, perform sentiment and industry analysis, and generate a comprehensive investment report. Table of Contents Project Overview Setting Up the Environment Creating the Express Server Fetching and Processing Data Integrating with OpenAI API Generating the Final Report Testing the Application Conclusion Project Overview Our goal is to build an API endpoint that…
Read More
Building a Website with Node.js and Express.js

Building a Website with Node.js and Express.js

This article divides deep into building websites with Node.js and Express.js. Express.js is an essential framework for creating robust and scalable web applications on top of Node.js, and today's focus will be on routing, middleware, template engines, and cookie sessions. Concept Highlights: app.use(callback) app.use(path, callback) GET, POST, PUT, DELETE Express Middleware Call the Next Middleware in the Stack Using Express Router Cookie Session Management Middleware Template Variables EJS 1. app.use(callback) The app.use(callback) method in Express.js is used to mount middleware functions. This middleware will run for every request made to your application, regardless of the HTTP method or URL. e.g.)…
Read More
Day 2: Creating a Signup Page with Express.js – Building the Foundation for User Registration

Day 2: Creating a Signup Page with Express.js – Building the Foundation for User Registration

Despite a busy schedule as a Customer Engineer, I found time to explore the process of creating a signup page using Express.js. Here’s a step by step breakdown of the process: Explanation of Steps Create an Express App: Start by initializing a new Express.js application. Create a Port for the Server: Define a port where your server will listen for requests. Accept Body Data (Middleware): Middleware functions are crucial in Express.js to handle and process requests before they reach your route handlers. Use middleware like express.json() to handle incoming JSON or URL-encoded data. Have HTML Pages for Signup Form: Design…
Read More
Practical Guide to Set Up Multiple NodeJS Apps on AWS EC2 Instance with Automatic Deployment using GitHub Actions (Screenshots)

Practical Guide to Set Up Multiple NodeJS Apps on AWS EC2 Instance with Automatic Deployment using GitHub Actions (Screenshots)

Introduction First of all, this is a verrrrrryyyyy loooooooooonnng epistle. Feel free to skim through to get the gist, and then come back again when you need to use it for a project. In this guide, I'll be as detailed as possible guiding you step by step on setting up your EC2 Instance, your code repository up to testing your deployment. Bookmark! Let's go! Setting Up an EC2 Instance on AWS. Navigate to the EC2 dashboard. Click on "Launch Instance" to create a new EC2 instance. Choose an Amazon Machine Image (AMI) (We'll use an Ubuntu Server AMI for this…
Read More
Setting up a Node.js Express project with Typescript

Setting up a Node.js Express project with Typescript

Setting up a Node.js project with TypeScript can significantly improve your developer experience by providing static type checking in your code. In this blog, I'll guide you through the steps to set up a Node.js Express project with TypeScript. Create your project directory Create a directory for your project and then navigate to it. In this example the name of our directory is node-ts. mkdir node-ts cd node-ts Enter fullscreen mode Exit fullscreen mode Initialize the project Install a new node project with npm init. This will create a package.json file in the root of your project. npm init Enter…
Read More
No widgets found. Go to Widget page and add the widget in Offcanvas Sidebar Widget Area.