Best of Node.jsJune 2024

  1. 1
    Article
    Avatar of communityCommunity Picks·2y

    A fully featured web framework for Node.js

    AdonisJS is a fully-featured web framework for Node.js that provides type-safety, ESM support, a feature-rich core, a collection of officially maintained packages, an IoC container, a powerful CLI, and security primitives. It has received praise from developers around the world and is sponsored by fantastic companies and individuals.

  2. 2
    Article
    Avatar of communityCommunity Picks·2y

    Writing A Microservice Using Node.js

    The post discusses the benefits of using Node.js for web services development and explains how to build a microservice using Node.js. It covers topics such as the tech stack, database choice, web framework, validation, configuration, static analysis, testing, logging, metrics, monitoring stack, local infrastructure with Docker, and continuous integration. The code examples and explanations provide valuable insights for Node.js web developers.

  3. 3
    Article
    Avatar of communityCommunity Picks·2y

    Node.js is Single-Threaded But Still Concurrent. How?

    Node.js is able to handle concurrent requests through its event-driven, non-blocking I/O model. This allows it to efficiently manage numerous connections simultaneously without the need for a dedicated thread per connection. The non-blocking I/O operations contribute to improved performance, making Node.js suitable for high I/O requirements. Additionally, the event-driven nature of Node.js simplifies code by eliminating the need for complex threading mechanisms.

  4. 4
    Article
    Avatar of communityCommunity Picks·2y

    How to use Socket.IO and build your first multiplayer game!

    Learn how to use Socket.IO to build a multiplayer game where a button moves to a random location when clicked. The tutorial guides you through setting up your environment, writing server code, and creating the real-time functionality using Socket.IO for seamless client-server communication. By the end, you'll understand how to pass data, emit, and listen for messages in a real-time web application.

  5. 5
    Article
    Avatar of communityCommunity Picks·2y

    Top 5 Node.js Backend Frameworks in 2024

    Explore the top 5 Node.js backend frameworks in 2024, including Express.js, NestJS, Koa.js, and Adonis.js. Learn about their key features and use cases.

  6. 6
    Article
    Avatar of communityCommunity Picks·2y

    Build a real-time voting app with WebSockets, React & TypeScript 🔌⚡️

    Learn how to build a real-time voting app using WebSockets in a React-NodeJS environment. Discover two methods: one using ExpressJS and Socket.IO for a customizable approach and the other using the Wasp full-stack framework for easier integration. Explore the differences between these methods, including setup complexity, control, and type safety. This guide highlights the limitations of serverless solutions for WebSockets and provides step-by-step instructions to implement and configure real-time communication features.

  7. 7
    Article
    Avatar of communityCommunity Picks·2y

    Securing Node.js in Production: Expert Practices for Every Developer

    This post provides expert practices for securing Node.js applications in production, including operating without root privileges, keeping NPM libraries up-to-date, customizing cookie names, implementing secure HTTP headers with Helmet, rate limiting, enforcing strong authentication policies, minimizing error details, vigilant monitoring, embracing HTTPS-only policy, validating user input, and leveraging security linters.

  8. 8
    Article
    Avatar of communityCommunity Picks·2y

    Worker Threads : Multitasking in NodeJS

    Learn about worker threads in Node.js, including the difference between concurrency and parallelism, how worker threads work, and the benefits of using them.

  9. 9
    Article
    Avatar of communityCommunity Picks·2y

    Build a Caching Layer in Node.js With Redis

    Learn how to build a caching layer in Node.js using Redis to improve the performance of your backend and increase the number of concurrent users. Redis is an in-memory data repository that provides extreme performance and efficiency for caching. By encapsulating caching logic in a middleware function, you can choose which routes to apply caching to, reducing code duplication and improving maintainability. This step-by-step tutorial shows you how to set up a Redis caching layer in an Express application and provides extra tips on compressing data for better memory utilization.

  10. 10
    Article
    Avatar of communityCommunity Picks·2y

    The best free, open-source SaaS template for React & NodeJS

    Open SaaS is a free, open-source SaaS template for React, NodeJS, and Prisma. It offers features such as authentication, admin dashboard, analytics integration, stripe payments, typesafety, AI-powered example app, and easy deployment.

  11. 11
    Article
    Avatar of denoDeno·2y

    A Gentle Intro to TypeScript

    TypeScript enhances JavaScript by adding type annotations that catch errors during compilation, making code more robust and easier to read. Switching to TypeScript involves adding type annotations to your functions, which the TypeScript compiler uses to infer types and ensure only valid operations. This can prevent entire categories of bugs frequently encountered in JavaScript. Tools like Deno and Vite simplify TypeScript adoption by automatically handling TypeScript to JavaScript compilation.

  12. 12
    Article
    Avatar of webtoolsweeklyWeb Tools Weekly·2y

    JS Library Tools, Git/CLI, Build Tools

    Discover new tools for JavaScript libraries, Git/CLI, and build tools. Highlights include Catena for type-safe APIs, Layer Cake for Svelte visualizations, several Git-related tools like ntcharts, Hookdeck CLI, superfile, and build tools including unplugin-parcel-macros and npm-check-extras. Also, learn about the Meco app for reading newsletters and commercial apps like Penify.dev and FILE0.

  13. 13
    Article
    Avatar of communityCommunity Picks·2y

    Building a Netflix show recommender using Crawlee and React

    Learn how to build a Netflix show recommender using Crawlee and React, guided through scraping Netflix content with Crawlee and visualizing it with a React app built with Vite. The guide covers prerequisites, installation steps, writing scraping code using Cheerio, and integrating the scraped data into a React application.

  14. 14
    Article
    Avatar of appsignalAppSignal·2y

    How to Perform Data Validation in Node.js

    Data validation is crucial in both frontend and backend applications to ensure data correctness, consistency, and security. This tutorial focuses on implementing data validation in Node.js using the express-validator library. It covers the importance and benefits of validating incoming requests, explains validation chains and schema-based validation, and provides sample code for validating route parameters, query parameters, and body data in an Express application.

  15. 15
    Article
    Avatar of hnHacker News·2y

    From dotenv to dotenvx: Next Generation Config Management

    Dotenvx, the evolution of the popular configuration tool dotenv, addresses major security and usability issues. It provides cross-platform consistency, supports multiple environments, and introduces encryption for .env files. Dotenvx aims to be the next generation in configuration management, offering features like runtime environment injection and enhanced security through public-key cryptography. Its release marks an important upgrade for managing environment variables securely and efficiently.

  16. 16
    Article
    Avatar of communityCommunity Picks·2y

    Profiling and Optimizing Node.js Application Performance

    Learn how to identify and fix performance bottlenecks in your Node.js application. Discover optimization strategies to streamline CPU-intensive tasks, reduce memory footprint, and enhance I/O efficiency.

  17. 17
    Article
    Avatar of communityCommunity Picks·2y

    The V8 JavaScript Engine

    This post provides an in-depth explanation of the V8 JavaScript engine, its role in Node.js, and how it works. It also mentions the possibility of creating your own JavaScript runtime using V8.

  18. 18
    Article
    Avatar of communityCommunity Picks·2y

    Event Loop in NodeJS

    This post explains the event loop in Node.js, including the different phases and the order of execution. It also covers the concepts of setTimeout, setImmediate, and process.nextTick, and how they work within the event loop.

  19. 19
    Article
    Avatar of communityCommunity Picks·2y

    Implementing Rate Limiting in API Routes with Express and Next.js

    Implementing rate limiting is essential for controlling the number of API requests users can make within a set timeframe, protecting the service from abuse and ensuring its availability and performance. The post explains the setup using the `express-rate-limit` middleware in a Next.js API route. This involves configuring parameters like `windowMs` for the time window and `max` for the maximum requests allowed. It is a practical method to enhance security and efficiency by preventing brute force attacks and managing server load effectively.