Best of Node.jsSeptember 2024

  1. 1
    Article
    Avatar of communityCommunity Picks·2y

    Top Open Source Projects That Improve Your Coding Skills

    Open source projects have revolutionized technology, providing tools and platforms for innovative solutions. Highlighted are impactful projects in Python, Java, project management, GitHub, C++, and JavaScript. Featured projects include Django, Flask, Pandas, Spring Framework, Apache Tomcat, Redmine, OpenProject, React, and Node.js, amongst others. Contributing to open source is encouraged with tips on finding and understanding projects, setting up environments, and community engagement.

  2. 2
    Article
    Avatar of communityCommunity Picks·2y

    Generate PDFs dynamically in NodeJs/NestJs

    This post describes the author's experience of dynamically generating PDFs using NodeJs and NestJs. Initially struggling with ineffective libraries, the author eventually chose jsPDF and its extension jspdf-autotable for creating features like graphs, charts, tables, images, table of contents, and automatic page numbers. The article includes detailed code snippets for setting up and using these libraries in a NestJs service, including handling installation issues for the canvas library on M-series Apple chips and rendering charts as images with the help of puppeteer.

  3. 3
    Article
    Avatar of communityCommunity Picks·2y

    Javascript Promises in depth with V8 engine internals

    JavaScript is often perceived as slow and not scalable due to its single-threaded nature. However, for I/O intensive tasks, JavaScript (particularly NodeJS) performs well by delegating I/O operations to the underlying OS threads and continuing with other tasks. The post explains the blocking and non-blocking nature of JavaScript, the role of C++ APIs, and how async programming works using callbacks, promises, and the event loop.

  4. 4
    Article
    Avatar of logrocketLogRocket·2y

    Building Telegram Mini Apps with React

    Telegram recently launched Mini Apps integration, allowing developers to build various applications within the Telegram ecosystem. These apps offer a native-like experience, bypassing the lengthy app store approval processes. This tutorial covers the creation of a full-stack ecommerce application using React, Node.js, and Postgres with Stripe integration for payments, all to run as a Mini App on Telegram.

  5. 5
    Article
    Avatar of logrocketLogRocket·2y

    Node.js performance hooks and measurement APIs

    Node.js provides built-in performance hooks and measurement APIs to help identify and address performance bottlenecks in applications. By using these tools, developers can achieve higher precision in measuring execution times, mark key events in the code, and use Prometheus for exporting performance data. The post covers methods like performance.now, performance.mark, and performance.measure for comprehensive performance monitoring, and provides examples of optimizing database queries and sorting algorithms. It also introduces the use of worker threads for offloading computationally intensive tasks without blocking the main thread.

  6. 6
    Article
    Avatar of freecodecampfreeCodeCamp·2y

    How to Write Cleaner Code Using Mongoose Schemas

    Learn to write cleaner and more maintainable code in your NodeJS applications using Mongoose schemas. Key concepts include discriminators for creating multiple models with shared schemas, statics for reusable model-level methods, methods for custom instance-level functions, and hooks for adding custom behavior during different document lifecycle stages. These features help organize your data and streamline your database operations.

  7. 7
    Article
    Avatar of logrocketLogRocket·2y

    Nitro.js: Revolutionizing server-side JavaScript

    Nitro.js is a universal server toolkit designed to simplify the creation of performant and scalable server-side JavaScript applications. It's used as the server engine for Nuxt v3 and is built on the lightweight h3 framework. Key features include universal deployments, TypeScript out-of-the-box, automatic module imports, file-based routing, and built-in caching. Nitro.js offers zero configuration setup, supports multiple platforms, and enhances developer experience by reducing boilerplate code. It is part of the UnJS ecosystem and supports hot module reloading, making it a robust choice for building and deploying modern web applications.

  8. 8
    Video
    Avatar of wdsWeb Dev Simplified·2y

    Node.js Doesn’t Suck Anymore

    Node.js has evolved significantly, adding impressive features like native TypeScript support, built-in test runners, and built-in debuggers. The support for ECMAScript modules and promises has been enhanced, and it now includes features like test coverage, environmental variable support, and seamless file system operations. New capabilities also include top-level await, WebSocket client support, and experimental SQLite support. These advancements make Node.js a robust choice for modern web development.

  9. 9
    Article
    Avatar of semaphoreSemaphore·2y

    API Security Best Practices: Protecting Your Data in Transit

    APIs are essential for modern web development, making them prime targets for cyberattacks. Securing APIs involves best practices such as encrypting communication via HTTPS, authenticating endpoints, using API gateways, enforcing fine-grained access control, and implementing rate limiting. Regular audits, penetration tests, and the use of security tools like linters, SCA, and SAST tools are also crucial. Following established security standards, such as those from OWASP, can further fortify API security.

  10. 10
    Article
    Avatar of communityCommunity Picks·2y

    How to Create a Secure Newsletter Subscription with NextJS, Supabase, Nodemailer and Arcjet 🔐💯

    Learn how to build a secure newsletter subscription form using NextJS, Supabase, Nodemailer, and Arcjet. This guide addresses common challenges like spam sign-ups, email validation, and bot protection, integrating robust security measures and validation techniques for a seamless double opt-in process.

  11. 11
    Article
    Avatar of bytesdevBytes by ui.dev·2y

    The Hono takeover

    Hono, a versatile JavaScript server framework built on Web Standards, is rapidly gaining popularity with an 11x growth in npm downloads over the past year. Initially loved for its speed and TypeScript support, recent releases have expanded its offerings to include powerful full-stack features like JSX components, RPC capabilities, and the HonoX meta-framework. These enhancements are making Hono a potential mainstream framework. Additionally, QA Wolf automates testing to improve efficiency.

  12. 12
    Article
    Avatar of platformaticPlatformatic·2y

    Introducing the Node Application Platform

    Platformatic has introduced the Node Application Platform designed to simplify the management of Node.js applications on Kubernetes. This includes Watt, a Node.js application server that automates multithreading and handles tasks like monitoring and logging. Additionally, Platformatic's Command Center provides a unified dashboard for managing Node.js applications, featuring an intelligent autoscaler to optimize performance and handle traffic spikes. These tools aim to reduce development time, enhance application performance, and improve the developer experience.

  13. 13
    Article
    Avatar of neontechNeon·2y

    Wrapping My Mind Around Node.js Runtimes

    Explore the innovations in JavaScript runtimes with a detailed look at Deno and Bun, and how they compare to Node.js. Understand the core components of a JavaScript runtime, the security and complexity issues in Node.js, and how Deno and Bun address these issues with features like built-in TypeScript support, enhanced security, and improved performance.

  14. 14
    Article
    Avatar of mlnewsMachine Learning News·2y

    Srcbook: A New Open-Source Application for Prototyping in TypeScript

    Srcbook is a local-first, open-source TypeScript notebook powered by Node.js, designed for prototyping, exploring libraries, and rapid iteration. It offers strong AI capabilities, a web interface, and the ability to export code to markdown format. Srcbook is inspired by Livebook and Jupyter and serves as a versatile development tool for backend and shared code environments.

  15. 15
    Article
    Avatar of fullstackdeveloperFullstack Developer·2y

    How to send emails with node.js

    Guide to sending emails with node.js using the nodemailer library and an email API service like Brevo, complete with code examples.

  16. 16
    Article
    Avatar of freecodecampfreeCodeCamp·2y

    How to Implement API Rate Limiting in Strapi CMS

    This post provides a comprehensive guide to implementing API rate limiting in a Strapi CMS application. It covers setting up a Strapi project, adding rate limiting using koa2-rate-limit and express-rate-limit, and configuring middleware to ensure API security. Practical code examples and detailed steps are included to help developers restrict access and prevent DDoS attacks.

  17. 17
    Article
    Avatar of communityCommunity Picks·2y

    Handling Environment Variables in Node.js

    Environment variable configuration is essential for managing secrets and following best practices like the twelve-factor methodologies in Node.js. This guide covers the importance of handling configurations, distinguishing between different environments, and using tools like Fastify for secret management. It also delves into the NODE_ENV variable, explaining how to set it appropriately for secure and efficient application deployment. A demo on using Platformatic for Node configuration is included.

  18. 18
    Video
    Avatar of kevinpowellKevin Powell·2y

    npm for absolute beginners

    Learn how to get started with npm, including installing Node.js, using the command line, initializing new projects, and understanding package.json files for managing dependencies and scripts. The guide covers basic navigation within the command line and provides an example of creating a project with Vite, adding dependencies, and using package managers efficiently.

  19. 19
    Article
    Avatar of hnHacker News·2y

    Understanding Concurrency, Parallelism and JS

    Concurrency and parallelism are often confused, but they have distinct differences. Concurrency involves handling multiple tasks by interleaving, while parallelism means performing them simultaneously. Threads can run concurrently or in parallel, depending on the CPU's number of cores. Node.js, though single-threaded, uses Worker Threads to manage blocking tasks, simplifying concurrency for developers. Understanding how Node.js handles concurrency can help avoid issues like race conditions, making programming more efficient and less error-prone.

  20. 20
    Article
    Avatar of evolvedevevolvedev·2y

    How to send emails with node.js

    Learn how to send emails using Node.js with the nodemailer library and the Brevo email API service. Code examples are provided for better understanding.

  21. 21
    Article
    Avatar of frontendmastersFrontend Masters·2y

    A Complete Guide to Beginning with TypeScript – Frontend Masters Boost

    A comprehensive guide detailing the prerequisites, initial setup, and benefits of learning TypeScript for JavaScript developers. It emphasizes the differences between TypeScript and JavaScript, explains TypeScript's type system, compiler, and language service, and provides curated resources and steps to facilitate learning TypeScript, highlighting its significance in professional development.

  22. 22
    Video
    Avatar of awesome-codingAwesome·2y

    What Happened in August?

    In August, significant updates included the announcement of React 19 at the React 2024 conference, promising better app performance and a new Action API. New independent browsers focusing on privacy, like Ladybird, are emerging. Node.js now supports TypeScript experimentally, simplifying TypeScript integration. Other notable updates include Astro's new content layer API, Puppeteer 23's Firefox support, and enhancements in KN.

  23. 23
    Video
    Avatar of communityCommunity Picks·2y

    How JavaScript is Executed

    JavaScript execution within web browsers involves JavaScript engines like V8 in Chrome and SpiderMonkey in Mozilla. The process includes parsing the code into tokens, compiling it via Just-in-Time compilation into machine code, and then execution with garbage collection handling unused variables. JavaScript operates in both development mode on a local server and in production mode on a remote server. Beyond browser environments, Node.js allows JavaScript to run outside of browsers, enabling server-side development, mobile apps, desktop applications, and more.