{"id":15455699,"url":"https://github.com/ruffiano/express-boilerplate-server","last_synced_at":"2026-04-11T14:04:12.482Z","repository":{"id":152364652,"uuid":"415307878","full_name":"Ruffiano/express-boilerplate-server","owner":"Ruffiano","description":"A Kickstarter project for quickly building RESTful APIs using Node.js, Express, Mongoose, NginX and Docker.","archived":false,"fork":false,"pushed_at":"2021-10-12T13:08:25.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-18T18:20:51.807Z","etag":null,"topics":["api","boilerplate-template","docker","docker-compose","express-js","load-balancer","nginx","nginx-docker","nodejs-server"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ruffiano.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2021-10-09T12:50:23.000Z","updated_at":"2021-10-12T13:18:21.000Z","dependencies_parsed_at":"2024-03-25T14:30:49.907Z","dependency_job_id":null,"html_url":"https://github.com/Ruffiano/express-boilerplate-server","commit_stats":{"total_commits":2,"total_committers":1,"mean_commits":2.0,"dds":0.0,"last_synced_commit":"8ce9abf833504c4d14dc7accb7aadb8e1ef92a44"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Ruffiano/express-boilerplate-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ruffiano%2Fexpress-boilerplate-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ruffiano%2Fexpress-boilerplate-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ruffiano%2Fexpress-boilerplate-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ruffiano%2Fexpress-boilerplate-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ruffiano","download_url":"https://codeload.github.com/Ruffiano/express-boilerplate-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ruffiano%2Fexpress-boilerplate-server/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269922906,"owners_count":24496999,"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","status":"online","status_checked_at":"2025-08-11T02:00:10.019Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["api","boilerplate-template","docker","docker-compose","express-js","load-balancer","nginx","nginx-docker","nodejs-server"],"created_at":"2024-10-01T22:20:27.490Z","updated_at":"2025-12-30T21:47:45.735Z","avatar_url":"https://github.com/Ruffiano.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A kickstarter for nodejs restfull API\n\nA boilerplate/kickstarter project for quickly building RESTful APIs using Node.js, Express, Mongoose, NginX and Docker.\n\n## Overview\nWhen I started this project, my primary focus was on simplicity and ease of use. You can downlaod this project and build your own project top of my source base.\n\n\nExpress server development, by runing cmd, you will get a production-ready Node.js app installed and fully configured on your machine. The app comes with many built-in features, such as authentication using JWT, request validation, unit and integration tests, nginx, docker support, API documentation, etc. For more details click on content.\n#\n\n## Manual Installation\nIf you would still prefer to do the installation manually, follow these steps:\n\nClone the repo:\n\n```bash\ngit clone https://github.com/Ruffiano/express-boilerplate-server.git\n```\n\n### :wrench: Installation\n\u003cbr/\u003e\n\n| Install | \n| :------: | \n| `npm install`|\n\n\u003cbr/\u003e\n\n### :electric_plug: Usage (from source)\n\nRun main server manulaly:\n\n| Run Code | Test All Code | Test by Name|\n| :------: | :------: | :------: |\n| `npm run start` | `npm run test` | `npm run test -- \"testName\" ` |\n\n\u003cbr/\u003e\n\nRun worker manulaly:\n\n| Run Code | Test All Code | Test by Name|\n| :------: | :------: | :------: |\n| `npm run worker` | `npm run woker` | `npm run test -- \"testName\" ` |\n\u003cbr/\u003e\n\n### Docker:\n```bash\ndocker-compose up\ndocker-compose down\n```\n\u003cbr/\u003e\n\n## Project Structure\n```\nsrc\\\n |--middlewares\\    # Custom express middlewares\n |--models\\         # Mongoose models (data layer)\n |--routes\\         # Routes\n |--startup\\        # Run all project dependet source\n |--test\\           # Unit tests and integration tests\n |--services\\       # Microservice app which is runnig with different process\n |--utils\\          # Utility classes and functions\n |--index.js        # App entry point\n```\n\u003cbr/\u003e\n\n## API Documentation\n\nTo view the list of available APIs and their specifications, run the server and go to `http://localhost:5000/v1/docs` in your browser. This documentation page is automatically generated using the [swagger](https://swagger.io/) definitions written as comments in the route files.\n\n\u003cbr/\u003e\n\n### API Endpoints\n\nList of available routes:\n\n**Routes**:\\\n```\n/api/v1/categories\n/api/v1/customers\n/api/v1/courses\n/api/v1/enrollments\n/api/v1/users\n/api/v1/auth\n```\n\n\u003cbr/\u003e\n\n### NGINX Configuration for load balancer:\n\nIf you want to run project by manualy without docker image, you shoul folow configuration steps in below, otherwise just type \"docker-compose up\" in command line:\n\n- Now let’s install Nginx in ubuntu.\n\n```bash\nsudo apt-get update\nsudo apt install nginx\n```\n- Next, open the file \n```bash\nsudo nano /etc/nginx/sites-enabled/myserver.conf\n```\n- Add this configurations into .conf file\n\n```\nupstream workers {  \n    server express.worker.1.com:5001 weight=6 max_fails=3 fail_timeout=30s;  # node 1\n    server express.worker.2.com:5002 weight=4 max_fails=3 fail_timeout=30s;  # node 2\n}\n\nserver {\n    listen 80;\n    listen [::]:80;\n    server_name amazonaws.com;  \n    \n    location / {\n        proxy_set_header X-Real-IP $remote_addr;\n        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n        proxy_set_header Host $http_host;\n        proxy_set_header X-NginX-Proxy true;\n        proxy_pass http://express.boilerplate.server.com:5000/;\n        proxy_redirect off;\n    }    \n    location /worker {\n        proxy_set_header X-Real-IP $remote_addr;  \n        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;  \n        proxy_set_header Host $http_host;  \n        proxy_set_header X-NginX-Proxy true;  \n        proxy_pass http://workers/;  \n        proxy_redirect off;  \n    } \n}\n```\n- Type this comand line\n```bash\nsudo nginx -t \n```\nThe output upon running the above command would look like this:\n```\nnginx: the configuration file /etc/nginx/nginx.conf syntax is ok\nnginx: configuration file /etc/nginx/nginx.conf test is successful\n```\n\n- The above output confirms that our configuration was successful. Next, stop and restart Nginx to enable your changes. Nginx is started upon installation by default.\n```bash\nsudo systemctl restart nginx\n```\n- If Nginx doesn’t automatically start for some reason, the command to start it is:\n```bash\nsudo systemctl start nginx\n```\n\n- Now it’s time to start our project\n```bash\nnpm run start \u0026\u0026 npm run worker\n```\n\n\n## Other Projects by Topic:\n1. [algorithms-and-data-structures](https://github.com/Ruffiano/algorithms-and-data-structures) - Data sturcture and algorithm.\n2. [loadbalancer.worker.server](https://github.com/Ruffiano/loadbalancer-worker-server) - Load Balancing and workers NodeJs apps using Nginx.\n3. [crash-reporter-server](https://github.com/Ruffiano/crash-reporter-server) - Collects any crashes (error, unhandled exceptiont, [log, info, warning]) by any application.\n\n\u003cbr/\u003e\n\n## Contributing\nContributions are more than welcome! Please check out the [contributing guide](CONTRIBUTING.md).\n\nCoding style guide\nESLint to ensure a consistent code style in the project, based on Airbnb's JS style guide. https://github.com/airbnb/javascript\n\n## License\n\n[MIT](LICENSE)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruffiano%2Fexpress-boilerplate-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fruffiano%2Fexpress-boilerplate-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruffiano%2Fexpress-boilerplate-server/lists"}