Node.js Pitfalls to Avoid
Despite its many advantages, Node.js comes with a set of potential pitfalls if you don't maintain your application properly, such as: In this post, we'll explore these pitfalls and how to avoid them. Let's dive straight in!
Despite its many advantages, Node.js comes with a set of potential pitfalls if you don't maintain your application properly, such as: In this post, we'll explore these pitfalls and how to avoid them. Let's dive straight in!
There are many ways to load code and access file-related constants in Ruby. We can create a clear architecture by separating and handling concerns into classes and pulling in only the classes we depend on. Many full-stack frameworks like Rails and Hanami offer a built-in method to access the classes we want, as long as we stick with a certain convention. How does this work? In this post, we will explore three different options for loading code: using load, require, and autoload.
An audit log is a documented record of events and activity within an information technology system. Audit logging is critical for application owners and administrators to track activity within their systems. In this post, we'll first dive into what auditing entails and what to consider when audit logging. We'll then explore some options for implementing audit logs, including PaperTrail, Audited, AuditLog, AppSignal, and a custom implementation. Let's get started!
A well-written test suite is a big part of any successful application. But let's say you rely on an external dependency for some parts of your app (for example, an external API for fetching user information). It then becomes important to mock that dependency in the test suite to prevent external API calls during testing or to test specific behavior. Several frameworks help reduce the boilerplate and make mocking safe for Elixir tests.
Setting up authentication for your Ruby app is important to ensure it is secure. In this post, we'll explore the rodauth-omniauth gem for Ruby to implement authentication in your app via third-party providers. First, let's quickly define authentication before exploring the benefits of OmniAuth and setting up the rodauth-omniauth gem for a Rails app. Let's dive straight in!
In this blog post, you'll see how useful open_browser/2 is when debugging LiveView tests. In addition, we'll give a brief introduction to testing LiveView. Let's get started!
Today, many web applications will feature pages that are publicly available — like a homepage — and more secure ones where a user has to log in to get access. The process of user registration, logging in, and tracking user session state is called "authentication". At the same time, when dealing with logged-in users, it's necessary to separate actions and resources that are available to them depending on their user roles. For example, "admins" generally have more access than normal users.
In the first part of this series, we explored the ins and outs of Elixir test factories and fixtures. However, test factories bypass the rules of your Elixir application. Let's turn our attention to how we can avoid this by using data generation functions. Let's dive straight in!
In an API-driven world, error handling is integral to every application. You should have an error handling layer in your Node.js app to deal with errors securely and effectively. In this article, we'll explore: Let’s jump right in!
In our last post, we persisted and restored a collapsed/expanded UI state with Kredis. However, the great pain point with this is that we have to invent a lot of Kredis keys. This time, we'll see how we can avoid this by developing a generalized solution for any DOM node whose attribute states we want to track on the server side. Let's dive straight in!