How to Manage Sessions in Node.js Using Passport, Redis, and MySQL

HTTP and HTTPS are internet protocols that allow data to be sent over the internet by sending a request via a web browser. Because they are stateless, each request sent to the browser is treated independently. This means that the browser cannot remember the source of a request, even if the same user makes it. HTTP sessions solve this problem.

This article will look at session management and how tools like Passport, Redis, and MySQL can help us manage Node.js sessions. Let's dive in.

Test React Native Apps With Cypress

This way we can test React Native Apps in Cypress. Furthermore, we can set the viewport and change it to a different device resolution in order to test the mobile web applications as well. Cypress is a modern tool for test automation, popular because of its ease of installation, inbuilt support for the various reports, and its capability to write Unit, API, and End to End Tests. 

Cypress supports almost all modern architecture development frameworks such as Angular, React Native, Vu, as well as MVC-type frameworks.

How to Wrap Text in HTML Canvas

Although adding text to HTML canvas is very common, there is no built in line break functionality. That means if our text is too long, the text will run off the end. Take the example below, where the text is supposed to be "Hello, this text line is very long. It will overflow". Since it's too long to fit in the canvas, it just overflows with no line breaks:

Code for this example:

Python, NoSQL and FastAPI Tutorial: Web Scraping on a Schedule

Web Scraping image

Can there be other use cases for Cassandra beyond messaging and chat? In this tutorial, we show you how to web scrape on a schedule by integrating the Python framework called FastAPI with Astra DB, a serverless, managed Database-as-a-Service built on Cassandra.

Recently, I caught up with the Pythonic YouTuber Justin Mitchell from CodingEntrepreneurs and we discussed how today’s apps are tackling global markets and issues. He pointed out that Discord stores 120 million messages with only four backend engineers—and that was back in 2017.

The Battle Of New Industry Standards: Is WebRTC Making Zoom Redundant?

In the last couple of years, the way people and businesses communicate and collaborate has changed significantly. At the beginning of the Covid-19 pandemic, video conference calls evolved as the go-to way for business communication. A Gartner report confirms, by 2024, only 25% of meetings will take place in person, down from 60% today (source).  Marketsandmarkets, a leading tech consulting firm, also confirms this trend, it says that the global video conferencing market size will grow to the tune of US$ 22.5 billion by 2026 with a 19.7% CAGR growth rate (source). However, this also intensified the clash for dominance between different between Zoom and WebRTC based tech players.

To cater to the growing needs for new-age video conferencing solutions, there is an increased focus on new industry standards. As a result, WebRTC (Web Real-Time Communication) has become the latest web standard. Integrating real-time communication capabilities through the web browser, WebRTC makes click-to-start meetings possible without downloading any dedicated app or plug-in. Moreover, it has taken over the conventional approach of using proprietary signaling and infrastructure as deployed by platforms like Zoom to battle over standards and codecs in the early phase. Let us examine how WebRTC does this.

How the LS Command Works on Linux

On a Linux or UNIX-based system, ls is one of the most useful commands you can know. Fundamentally, it tells you information of files and folders on your system - and is extremely useful when you only have access to a server or computer via a terminal window. Let's look at how it works, and discuss some of the features of ls that you may not know.

The syntax for ls looks like this, where [OPTIONS] are optional settings, and [FILE|FOLDER] is an optional link to the file or folder we want to check. If we only type ls, it will check the current folder.

12 Useful JavaScript Newsletters

As any software developer knows, it's vital that you keep learning to improve your game and stay on top of things. This is especially important in the JavaScript ecosystem, where things keep evolving quickly, especially with all the awesome frameworks we have today.

One of the simplest ways to do this is by subscribing to useful JavaScript newsletters and getting updates and tutorials straight into your inbox. In this post, let's look at 12 of the best ones.

Dynamic Lists With SwiftUI Using Swift Concurrency for Asynchronous Data Loading

In a previous blog post, I described an implementation of lists in SwiftUI where items are loaded dynamically as the user scrolls and additional data for each item is fetched asynchronously. I also wanted to provide a reusable infrastructure for lists where you could concentrate only on the data fetching logic and the presentation of a single list item, but didn’t quite reach that goal.

In this blog post, I try to improve the list infrastructure and the separation of concerns between the data model and UI. I also want to test the Swift Concurrency features (async/await etc) for the asynchronous parts, and see how well it plays with SwiftUI.

Testing Golang With httptest

Go, often referred to as Golang, is a popular programming language built by Google. Its design and structure help you write efficient, reliable, and high-performing programs. Often used for web servers and rest APIs, Go offers the same performance as other low-level languages like C++ while also making sure the language itself is easy to understand with a good development experience.

Go’s httptest package is a useful resource for automating your server testing process to ensure that your web server or REST API works as expected. Automating server testing not only helps you test whether your code works as expected; it also reduces the time spent on testing and is especially useful for regression testing. The httptest package is also useful for testing HTTP clients that make outbound requests to remote servers.

How To Hire Remote Developers Successfully

There are many aspects to consider when you want to hire remote developers: the candidate’s technical and soft skills, the region where you hire, how to find a developer, hiring format, and many more. Here, we’ll talk about what a developer needs to work efficiently in the remote format, as well as how to check if this work is efficient. 

Ask an HR manager about what is important for a remote developer and most likely you will hear that this person should be independent, organized, self-disciplined, structured, etc. That sounds reasonable, but what hides behind these names in reality? Let’s take a thorough look at the candidate requirements from a practical perspective. 

Creating Your First Svelte App With SvelteKit

Svelte is a lightweight framework for building web applications. When you use it, it looks and feels a lot like other frontend frameworks like React and Vue, but leaves the virtual DOM behind. That, along with other optimizations, means it does far less work in the browser, optimizing user experience and load time.

In this guide, we'll be going over how to set up your first Svelte application using SvelteKit. Svelte has a number of different ways to make applications, and SvelteKit is one of the official packages from Svelte for doing that. If you're interested in other frameworks, you might enjoy a similar guide we have on making your first Vue application.

How to Easily Add CSV Import to Your React App

CSV is convenient. The likes of Excel, Google Docs, spreadsheet export functions, and reporting applications all support CSV in some capacity. CSV works well with large data sets and the major perk is that it can easily be converted to other formats such as XML or JSON.

This is where the hard part starts: how do you easily convert CSV data for your app, MVP, or SaaS? For JavaScript-based applications, there are a plethora of free CSV parsers available. While these libraries are great, open-source is known to pose a security risk such as relaxed integration oversight and potentially poor and integrated practices.

Xamarin vs React Native: Which One Wins The Race?

Cross-platform application development has completely changed the way developers develop over the last few years, and there's a reason for that! It lets them write code once and then use it on multiple platforms from Android to Windows to iOS. In addition, implementing these practices provides the best chance of creating a successful mobile app, whether it is designed for internal purposes or for distribution on app stores.

As software development becomes increasingly cross-platform, users will be able to save time, money, and effort. Approximately one-third of all developers use a cross-platform approach, while the rest develop native apps. The top two cross-platform frameworks are Xamarin and React Native.

Binary Search in Python

Binary search is the search technique that helps to make the searching faster. So for understanding the binary search method implementation in Python, let’s first understand linear search? 

In this article, we will answer the following questions: What the binary search is? How is it derived? How does it search faster?

How to Use Templates in Vue

In Vue, templating is the main way we create reusable components. We can use templates to take data and turn it into real elements on a screen that users can see. In this article, we'll be covering how templates work in Vue, and some things about them that you may not have known.

Creating a Template in Vue

Every Vue .vue file has to have a <template> tag. The <template> tag itself is simply a container for all the HTML that is going to go into building our component. When a .vue file is rendered, all <template> tags are removed. A very basic template in Vue looks something like this: