Latest Tutorials

Learn about the latest technologies from fellow newline community members!

  • React
  • Angular
  • Vue
  • Svelte
  • NextJS
  • Redux
  • Apollo
  • Storybook
  • D3
  • Testing Library
  • JavaScript
  • TypeScript
  • Node.js
  • Deno
  • Rust
  • Python
  • GraphQL
  • React
  • Angular
  • Vue
  • Svelte
  • NextJS
  • Redux
  • Apollo
  • Storybook
  • D3
  • Testing Library
  • JavaScript
  • TypeScript
  • Node.js
  • Deno
  • Rust
  • Python
  • GraphQL

    Setting Environment Variables in Supertest

    When working testing web applications, it's crucial to manage environment variables efficiently. These variables provide your application with the context it needs to run correctly in different environments, such as development, testing, and production. In this post, we'll explore how to set environment variables in Supertest, a popular testing library for HTTP assertions in Node.js. With a user-friendly API, it allows developers to test HTTP endpoints with ease. Before we dive into how to set environment variables in Supertest, it's worth discussing why you might want to use Supertest in the first place. Supertest allows you to: With a straightforward syntax and powerful features, Supertest has become a favorite among Node.js developers looking to ensure their APIs function as expected.

      How to Read Environment Variables in Vite React

      In web development, managing environment variables efficiently is crucial, especially when using frameworks like Vite alongside React. These variables allow you to store configuration options that can change depending on the environment your application is running in—whether it's development, testing, or production. If you're wondering how to read environment variables specifically in a Vite React project, you’re in the right place. Environment variables are key-value pairs stored outside your codebase, which can be accessed within your application. They help keep sensitive information secure, like API keys or database credentials, and provide flexibility for various deployment environments. Vite, a powerful build tool, has its own way of handling environment variables. Let’s discuss how you can read these variables in a Vite React application.

      I got a job offer, thanks in a big part to your teaching. They sent a test as part of the interview process, and this was a huge help to implement my own Node server.

      This has been a really good investment!

      Advance your career with newline Pro.

      Only $40 per month for unlimited access to over 60+ books, guides and courses!

      Learn More

        How to Unset Environment Variables in Python

        Working with environment variables in Python is a necessity for many developers. Environment variables are often used to configure your application in a way that's independent of the code itself. However, there are times you may need to unset or remove these variables. In this guide, we’ll explore how to unset environment variables using Python effectively. Before we dive into the code, let’s clarify why you might want to unset environment variables: The simplest way to unset environment variables in Python is through the os module. Here's how to get started:

          Exploring the Benefits of Using a Bun Monorepo

          Managing multiple repositories can lead to complexities and inefficiencies in the development process, that's why so many teams are migrating to monorepos. A bun monorepo offers a streamlined approach to organizing codebases and enhancing collaboration within development teams. A bun monorepo , a term derived from the idea of bundling all related projects into a single repository, promotes a cohesive development workflow that can have a significant impact on the efficiency and scalability of a project. At its core, a bun monorepo encapsulates the notion of consolidating all related projects under a single repository structure. This means that various components, libraries, and applications that are part of a larger software ecosystem reside within the same repository, fostering a centralized and interconnected development environment.

            Understanding and Implementing import/no-extraneous-dependencies eslint Rule in a Monorepo

            One of the biggest advantages of using a monorepo is that you can manage dependencies centrally. One crucial aspect of maintaining a clean and efficient codebase is ensuring that only necessary dependencies are included in each package. The ESLint rule import/no-extraneous-dependencies can help with this by flagging any unnecessary or extraneous dependencies. Let's dive into how you can effectively use this ESLint rule within your monorepo setup. To start leveraging the import/no-extraneous-dependencies rule in your monorepo, you first need to configure ESLint to recognize and enforce this rule. Here's a step-by-step guide on how you can achieve this: