{"id":18862029,"url":"https://github.com/marco-rosner/node-express-server","last_synced_at":"2026-04-09T18:17:22.444Z","repository":{"id":197313399,"uuid":"698385270","full_name":"marco-rosner/node-express-server","owner":"marco-rosner","description":"A server benchmark among pure NodeJS, ExpressJS, and Fiber (golang) using MongoDB","archived":false,"fork":false,"pushed_at":"2024-05-29T02:02:37.000Z","size":18621,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-30T20:48:44.179Z","etag":null,"topics":["benchmark","docker","docker-compose","expressjs","fiber","golang","javascript","mongodb","mongoose","nodejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marco-rosner.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-29T19:48:44.000Z","updated_at":"2024-05-29T02:02:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"ed53214c-74d6-46d6-8293-36a9ea4da9ca","html_url":"https://github.com/marco-rosner/node-express-server","commit_stats":null,"previous_names":["marco-rosner/node-express-server"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marco-rosner%2Fnode-express-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marco-rosner%2Fnode-express-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marco-rosner%2Fnode-express-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marco-rosner%2Fnode-express-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marco-rosner","download_url":"https://codeload.github.com/marco-rosner/node-express-server/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239802782,"owners_count":19699567,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["benchmark","docker","docker-compose","expressjs","fiber","golang","javascript","mongodb","mongoose","nodejs"],"created_at":"2024-11-08T04:33:04.397Z","updated_at":"2026-02-09T21:30:17.408Z","avatar_url":"https://github.com/marco-rosner.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n# NodeJS / ExpressJS server\n\nAfter the benchmark of Go Servers (see [code here](https://github.com/marco-rosner/lightweight-go-server) and the [conclusions here](https://medium.com/p/caadd9a78319)), this project is a server benckmark among pure NodeJS, ExpressJS and Fiber (golang) server using MongoDB, Fiber and MongoDB are the winners from Go Servers benchmark. We will use some of the rules from [Rinha de beckend](https://github.com/zanfranceschi/rinha-de-backend-2023-q3) to get the results.\n\n## Project Setup\n\n```sh\nnpm install\n```\n\n### Hot-Reload for Development\n\n```sh\nnpm run dev:\u003cnode|express\u003e\n```\n\n### Run server\n\n```sh\nnpm run start:\u003cnode|express\u003e\n```\n\n### Using Docker\n\nRun `mongo:latest` image:\n\n```sh\ndocker run -d -p 27017:27017 -p 28017:28017 -e AUTH=no mongo:latest\n```\n\nBuild the node or express server image using the correspondent dockerfile then run the image:\n\n```sh\ndocker build -t \u003cnode|express\u003e-server -f \u003cnode|express\u003e.dockerfile .\ndocker run --network=\"host\" --rm -p 8080:8080 node-server\n```\n\n### Using Docker Compose\n\nMake sure that you have [docker](https://docs.docker.com/get-docker/) and [docker compose](https://docs.docker.com/compose/install/) installed. Next, you should choose which server (node or express) you would like to run (e.g. `docker-compose-\u003cserver\u003e-mongo.yml`) and run the command like this:\n\n```sh\ndocker-compose -f docker-compose-\u003cnode|express\u003e-mongo.yml up --remove-orphans\n```\n\n## Run benchmark\n\nI am using Gatling to run the benchmark and to install it go to benchmark folder and run the `install-gatling` script. After that, move the `BenchmarkSimulation.scala` file to `deps/gatling/user-files/simulations` and the resources `pessoas-payloads.tsv` and `termos-busca.tsv` to `deps/gatling/user-files/recources`.\n\nGo to the command line and run:\n\n```sh\nsh deps/gatling/bin/gatling.sh\n```\n\n## Last results\n\n![ExpressJS](./benchmark/resources/express-mongo.png?raw=true \"ExpressJS server\")\nExpressJS  \n![Fiber](./benchmark/resources/fiber-go-mongo.png?raw=true \"Fiber server\")\nFiber  \n![NodeJS](./benchmark/resources/node-server-mongo.png?raw=true \"NodeJS server\")\nNodeJS  ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarco-rosner%2Fnode-express-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarco-rosner%2Fnode-express-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarco-rosner%2Fnode-express-server/lists"}