Best of Node.js β€” August 2024

  1. 1
    Article
    Avatar of logrocketLogRocketΒ·2y

    JavaScript design patterns guide

    Developers use design patterns as reusable solutions to common problems. This guide demonstrates several JavaScript design patterns, including creational (factory and builder), structural (adapter and decorator), and behavioral (chain of responsibility and strategy) patterns. Each pattern is illustrated with practical code examples to aid understanding.

  2. 2
    Article
    Avatar of freecodecampfreeCodeCampΒ·2y

    How to Implement Message Queues in Your Backend Applications

    Message queuing is essential for backend development to address scalability issues and ensure orderly communication among services. This post explains the concept of message queues, its use cases in industries like fintech and healthcare, and popular tools such as RabbitMQ and Apache Kafka. A demo project using RabbitMQ with Node.js is also provided, illustrating how to build a message publisher and consumer for seamless communication.

  3. 3
    Article
    Avatar of communityCommunity PicksΒ·2y

    I Built an Event Scheduler in NodeJs using Google Calendar API πŸš€

    The post guides you through building an event scheduler in Node.js that integrates with Google Calendar API. It covers setting up a Node.js project, configuring environment variables, creating an Express server, and using OAuth 2.0 for authentication. Additionally, it explains how to schedule events, add Google Meet links, and notify attendees via email.

  4. 4
    Article
    Avatar of communityCommunity PicksΒ·2y

    Encore.ts β€” 9x faster than Express.js & 3x faster than Bun + Zod

    Encore.ts is an Open Source backend framework for TypeScript, boasting performance numbers 9x faster than Express.js and 3x faster than Bun with Zod. Its architecture leverages a multi-threaded event loop using Rust, and precomputes request schemas to optimize performance. With infrastructure integrations built in Rust, Encore.ts aims to off-load non-business logic from the JavaScript event loop, making backend applications highly optimized for speed and efficiency while maintaining compatibility with Node.js.

  5. 5
    Article
    Avatar of communityCommunity PicksΒ·2y

    thedevdojo/pines: The Pines UI library

    Pines UI Library is an open-source project available on GitHub, easy to set up locally with NodeJS and http-server. It is licensed under the MIT license. For support and questions, users are encouraged to visit the DevDojo discussions section.

  6. 6
    Article
    Avatar of freecodecampfreeCodeCampΒ·2y

    How to Build an Application With Node.js

    Learn how to build an event management application using Node.js, Express.js, and MongoDB. The guide covers setting up a Node.js project, creating a server with Express.js, rendering dynamic pages with embedded JavaScript (ejs), connecting to a MongoDB database, and creating models and schemas for data. It also includes steps for handling HTTP requests and responses, creating HTML pages, organizing code with partials, and securing sensitive information with environment variables.

  7. 7
    Article
    Avatar of communityCommunity PicksΒ·2y

    Securing Node.js in Production

    Ensuring the security of your Node.js application involves several advanced techniques such as avoiding root privileges, keeping npm libraries updated, customizing cookie names, implementing secure HTTP headers with Helmet.js, applying rate limiting, enforcing strong authentication policies, minimizing error details, vigilant monitoring, adhering to HTTPS-only policies, validating user input, and using security linters for automatic risk detection.

  8. 8
    Article
    Avatar of communityCommunity PicksΒ·2y

    Mastering Microservices in NestJS: Powerful Design Patterns for Flexibility, Resilience, and Scalability

    Microservices architecture offers flexibility, resilience, and scalability for modern applications. Key design patterns like Gateway, Service Registry, Circuit Breaker, SAGA, CQRS, Bulkhead, Sidecar, API Composition, Event-Driven Architecture, Database per Service, Retry, and Configuration Externalization significantly enhance NestJS microservices. These patterns ensure better service management and inter-service communication.

  9. 9
    Article
    Avatar of bytesdevBytes by ui.devΒ·2y

    React Native goes stable

    React Native has moved closer to a stable release with its v0.75 update, which includes significant bug fixes, improvements in auto-linking speed, and the integration of Yoga v3.1. The update represents a step towards better developer experience and addressing long-standing interoperability issues. Additionally, there are changes on the horizon such as the sunsetting of the 'react-native init' command, further promoting the use of Expo. Also discussed are improvements and benefits offered by QA Wolf, a tool for enhanced QA testing efficiency.

  10. 10
    Video
    Avatar of youtubeYouTubeΒ·2y

    Build Nextjs Inventory Management Dashboard & Deploy on AWS | Postgres, Node, Tailwind, EC2, RDS, S3

    Learn to build a full-stack inventory management dashboard using Next.js, with a Node.js backend, and deploy it on AWS. The application features dark and light modes, responsive design, and pages for inventory, products, users, settings, and expenses. The frontend uses Redux Toolkit for state management and Tailwind CSS for styling. The backend relies on Node.js and Express.js with Prisma for interacting with a PostgreSQL database, and the deployment involves AWS services like EC2, RDS, Amplify, and S3. Detailed steps for setting up the project, including installing necessary packages and configuring Redux and Tailwind, are also covered.

  11. 11
    Article
    Avatar of devtoDEVΒ·2y

    Project Starter Kit: Neon Postgres Database + ExpressJs + TypeScript and TypeORM

    A comprehensive starter kit incorporating TypeScript, TypeORM, Neon Postgres, and ExpressJs is available for quickly scaffolding backend projects. It provides CRUD operations, entity definitions, and database configurations. The kit includes a CLI tool for easy setup and is well-documented for both beginners and advanced developers. Find it on GitHub and use it to boost productivity and ensure best practices.

  12. 12
    Article
    Avatar of nodejsdevelopersNode.js developersΒ·2y

    Node.js Tip of the Week

    Node.js introduces a new feature in its native test runner, allowing developers to mock method calls using mock.method(object, method). This feature supports the optional provision of a custom implementation.

  13. 13
    Article
    Avatar of communityCommunity PicksΒ·2y

    Free ngrok alternative for async web dev - the Hookdeck CLI

    Ngrok has shifted its focus away from development use cases, prompting the search for alternatives. Hookdeck CLI emerges as a free, efficient solution for receiving asynchronous webhooks from third-party services like Stripe, Shopify, or Twilio. It supports event-driven applications but doesn't cater to the request/response paradigm. The post walks through installing Hookdeck CLI, setting up a Node.js server, and testing webhooks, making it a robust replacement for ngrok in specific development scenarios.

  14. 14
    Article
    Avatar of communityCommunity PicksΒ·2y

    muneebhashone/typescript-backend-toolkit: TypeScript Backend Toolkit

    This robust TypeScript backend boilerplate emphasizes scalability, flexibility, and ease of development. It includes modern technologies and best practices such as MongoDB and Redis setup with Docker, comprehensive user management, file uploads with Multer and S3, Zod for data validation, and extensive middleware support. The setup guide covers Docker Services, dependency installation with PNPM, environment configuration, and running the development server. The toolkit also supports advanced features like JWT extraction, background job handling with BullMQ, email handling with Nodemailer, ESLint for code quality, and infrastructure management with AWS CDK.

  15. 15
    Article
    Avatar of arcjetArcjetΒ·2y

    A Modern Approach to Secure APIs with Node.js, Express, TypeScript, and ESM

    Learn to build a modern, secure Node.js API with Express, TypeScript, and ESM. Configure TypeScript with Express, enable hot-reloading with nodemon, and secure your API using Arcjet for rate-limiting and bot protection. The guide includes steps to initialize a Node.js project, configure a TypeScript setup, set up an Express server, and integrate security measures while ensuring smooth development with hot-reloading.

  16. 16
    Article
    Avatar of devtoDEVΒ·2y

    Modern API Development with Node.js, Express, and TypeScript using Clean Architecture

    This guide covers building a modern API using Node.js, Express, and TypeScript, with a focus on Clean Architecture principles. Topics include setting up the project, structuring it with Clean Architecture, implementing various layers such as domain, use cases, infrastructure, and interface. It also touches on Dependency Injection, error handling, data validation, real database integration with MongoDB, authentication with JWT, logging with Winston, environment configuration, CI/CD, and project documentation with Swagger.

  17. 17
    Article
    Avatar of hnHacker NewsΒ·2y

    srcbookdev/srcbook: JS/TS notebook

    Srcbook is a CLI application with a web interface that allows for the creation, execution, and sharing of TypeScript and JavaScript notebooks. It supports local execution, exporting to markdown, and includes AI features for idea exploration. Srcbook can be installed via npm, offers various commands for users, and is open-source under the Apache2 license.

  18. 18
    Article
    Avatar of devtoDEVΒ·2y

    Docker: A Simple Introduction with Legos

    Docker is a tool that simplifies the process of building, transporting, and running applications by using lightweight containers. It ensures consistency and portability across different environments, makes resource management more efficient, and streamlines development. Building a Docker image involves creating a Dockerfile, assembling dependencies, and running the application in a container. Docker Compose can be used to manage multiple containers, such as a web application and a database, with ease.

  19. 19
    Article
    Avatar of communityCommunity PicksΒ·2y

    Deploy Your Express Backend in Vercel for Free πŸš€βš‘

    Learn how to deploy your Node.js Express application on Vercel for free using a few simple steps. Create a basic Express app, configure the vercel.json file to route requests, and use the Vercel CLI for deployment. Understand important considerations when switching to Vercel’s serverless architecture, such as handling database connections, websockets, and efficient error handling.

  20. 20
    Article
    Avatar of devtoDEVΒ·2y

    Create Your Own AI Discord Bot with Julep

    Creating a Discord bot that interacts with users can be tough and time-consuming, but Julep simplifies the process. Julep is a platform that aids in building stateful, functional LLM-powered applications with minimal coding. The post offers a step-by-step guide to creating an AI Discord bot using Node.js, Julep SDK, and Discord.js. Key features of Julep include composio tools integration, support for multiple AI agents, and in-built RAG, making it stand out from other platforms like OpenAI's GPT-3. Detailed instructions for setting up, obtaining API keys, and deploying the bot are provided.

  21. 21
    Article
    Avatar of itnextITNEXTΒ·2y

    Exploring API Stubbing Strategies in Node.js

    API stubbing is crucial for testing Node.js applications that depend on external services. The post explores two key tools, Nock and stub-service, which allow you to mock HTTP requests or create stub servers, respectively. Nock is ideal for intercepting HTTP requests within the same process, while stub-service lets you set up a local stub server quickly. Understand their use cases and limitations to choose the right tool for effective testing.

  22. 22
    Article
    Avatar of traversymediaTraversy MediaΒ·2y

    Ultimate Web Scraping Guide (Python & Node.js)

    Learn the fundamentals of web scraping with practical examples using Node.js with Puppeteer and Python with Beautiful Soup. This comprehensive guide will provide you with the essential skills needed to scrape data from websites effectively.

  23. 23
    Article
    Avatar of firebase-developersFirebase DevelopersΒ·2y

    Gemma2 Tutorial: Local LLM Development with Genkit

    Google's open-source LLM, Gemma2, can be run locally using Ollama. This step-by-step guide explains how to install Gemma2, create a Genkit project, and integrate it with Ollama Gemma2. The process involves installing appropriate packages, configuring Genkit, and writing a sample flow to handle requests. The setup is efficient enough to be accomplished in around 30 lines of code.

  24. 24
    Article
    Avatar of newstackThe New StackΒ·2y

    How To Build Scalable Real-Time Applications With JavaScript

    Real-time applications (RTAs) offer businesses faster decision-making, improved user experience, and enhanced security. Building scalable RTAs with JavaScript involves overcoming challenges related to latency, synchronization, scalability, and security. Key technologies include WebSocket for bi-directional communication, Server-Sent Events (SSE) for server-to-client updates, and Socket.IO for enhanced functionalities. Ensuring low latency, efficient performance, and robust security are critical for successful deployment.

  25. 25
    Article
    Avatar of electronElectronΒ·2y

    Electron 32.0.0

    Electron 32.0.0 has been released with upgrades to Chromium 128.0.6613.36, V8 12.8, and Node 20.16.0. This version introduces new features like the `cumulativeCPUUsage` property, navigation-related APIs in `webContents.navigationHistory`, and support for the Windows Control Overlay API on Linux. Notable breaking changes include the removal of the nonstandard `File.path` property and deprecation of certain navigation-related APIs in `WebContents`. Support for Electron 29.x.y has ended.