{"id":15901172,"url":"https://github.com/mbchoa/nginx-node-lb","last_synced_at":"2026-05-15T23:02:30.910Z","repository":{"id":71227143,"uuid":"83114730","full_name":"mbchoa/nginx-node-lb","owner":"mbchoa","description":"Example project to learn about NGINX load balancing Node instances","archived":false,"fork":false,"pushed_at":"2017-02-26T08:12:43.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-02T19:47:14.113Z","etag":null,"topics":["load-balancer","nginx","nodejs"],"latest_commit_sha":null,"homepage":null,"language":"Nginx","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/mbchoa.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":"2017-02-25T07:28:06.000Z","updated_at":"2017-04-07T17:14:05.000Z","dependencies_parsed_at":"2023-03-13T20:21:17.838Z","dependency_job_id":null,"html_url":"https://github.com/mbchoa/nginx-node-lb","commit_stats":{"total_commits":5,"total_committers":2,"mean_commits":2.5,"dds":"0.19999999999999996","last_synced_commit":"6b58c9280d091273c09573f6a5fbdfbb40012d4d"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mbchoa/nginx-node-lb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbchoa%2Fnginx-node-lb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbchoa%2Fnginx-node-lb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbchoa%2Fnginx-node-lb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbchoa%2Fnginx-node-lb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mbchoa","download_url":"https://codeload.github.com/mbchoa/nginx-node-lb/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbchoa%2Fnginx-node-lb/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265529034,"owners_count":23782804,"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":["load-balancer","nginx","nodejs"],"created_at":"2024-10-06T11:01:47.336Z","updated_at":"2026-05-15T23:02:30.827Z","avatar_url":"https://github.com/mbchoa.png","language":"Nginx","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Background\nThis is a sample repo I created for the express purpose of learning and becoming familiar with how to setup NGINX service in front of Node.js servers.  Specifically in this particular case, I've configured NGINX as a reverse proxy and load balancer, load balancing 2 Node.js servers behind it.\n\n# Setup\n1. Install `nginx` on system by running `brew install nginx`\n2. Copy `nginx.conf` file in this repo to `/usr/local/etc/nginx`\n3. Run `npm install` in repo to install npm modules, mainly express\n4. Run `npm start` to start up Node server instances (server #1 on localhost:8080 and #2 on localhost:8081)\n5. Run `brew services start nginx` to startup the NGINX service at `http://localhost:8080`\n6. Open browser to `http://localhost:8080` and refresh page a few times.  \n\nYou should see a page with the message \"Hello World from Node Server #1\" or \"Hello World from Node Server #2\".  This is effectively NGINX handling the request and proxying to the 2 Node servers using round-robin load balancing.\n\n# Resources\n- Installing NGINX on MacOSX: [http://learnaholic.me/2012/10/10/installing-nginx-in-mac-os-x-mountain-lion/](http://learnaholic.me/2012/10/10/installing-nginx-in-mac-os-x-mountain-lion/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbchoa%2Fnginx-node-lb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmbchoa%2Fnginx-node-lb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbchoa%2Fnginx-node-lb/lists"}