Serving static files with Node.JS

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • polka

    A micro web server so fast, it'll make you dance! :dancers:

    Express.js, with its long-lived version 4 is famous for its somewhat low performance. Other projects like fastify or polka have benchmarks outperforming Express.js. I don’t know why Express is slower, maybe because of regex processing of routes? If you’re using parametric routes like /users/:userid/entity and have no regexp routes, then replacing Express.js with fastify or polka will add a performance boost to your app. They are not direct replacements, but you can convert code if you really need that boost. In the article below benchmarks shows huge improvement, but in reality, your code will be a limiting factor to your app performance, and you are unlikely notice any improvement.

  • node-static-server-test

    All code snippets and test scripts are available on my GitHub repo https://github.com/apla/node-static-server-test.

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

  • fastify-static

    Plugin for serving static files as fast as possible

  • serve-static

    Serve static files

  • sirv

    An optimized middleware & CLI application for serving static files~!

  • serve-static

    Serve static websites (SPA's) using Nest framework (node.js) 🥦 (by nestjs)

    Take a look at Nest.js web server. When the file serving option is turned on, it not only slows down your app because filesystem checks for every request but also using synchronous fs.stat to check if the file exists.

  • µWebSockets

    Simple, secure & standards compliant web server for the most demanding of applications

    File serving doesn't need any workarounds because of good routes handling.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

  • uWebSockets.js

    μWebSockets for Node.js back-ends :metal:

    nodejs drama: developer doesn't want to comply with existing nodejs interfaces with it's own nodejs package. «What Node.js does with their streams has no significance to this project. If you see similarities - good - but that doesn't mean anything more than that there are similarities. The entire premise, the hypothesis of this project since day 1 has always been and will continue to be: "Node.js is doing things unreasonably inefficient." In other words - the difference between this project and Node.js is no act of random.»

  • fastify

    Fast and low overhead web framework, for Node.js

    Express.js, with its long-lived version 4 is famous for its somewhat low performance. Other projects like fastify or polka have benchmarks outperforming Express.js. I don’t know why Express is slower, maybe because of regex processing of routes? If you’re using parametric routes like /users/:userid/entity and have no regexp routes, then replacing Express.js with fastify or polka will add a performance boost to your app. They are not direct replacements, but you can convert code if you really need that boost. In the article below benchmarks shows huge improvement, but in reality, your code will be a limiting factor to your app performance, and you are unlikely notice any improvement.

  • Express

    Fast, unopinionated, minimalist web framework for node.

    Express.js, with its long-lived version 4 is famous for its somewhat low performance. Other projects like fastify or polka have benchmarks outperforming Express.js. I don’t know why Express is slower, maybe because of regex processing of routes? If you’re using parametric routes like /users/:userid/entity and have no regexp routes, then replacing Express.js with fastify or polka will add a performance boost to your app. They are not direct replacements, but you can convert code if you really need that boost. In the article below benchmarks shows huge improvement, but in reality, your code will be a limiting factor to your app performance, and you are unlikely notice any improvement.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts