{"id":17415304,"url":"https://github.com/adnanrahic/boilerplate-api","last_synced_at":"2026-03-09T08:02:11.860Z","repository":{"id":54541105,"uuid":"93270474","full_name":"adnanrahic/boilerplate-api","owner":"adnanrahic","description":"Lightweight Node.js boilerplate API with Docker support, test coverage and circle.ci support.","archived":false,"fork":false,"pushed_at":"2018-12-26T08:20:30.000Z","size":2448,"stargazers_count":23,"open_issues_count":5,"forks_count":12,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-09-14T04:32:53.927Z","etag":null,"topics":["boilerplate","ci-support","circleci","docker","expressjs","heroku","javascript","mocha","mongodb","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/adnanrahic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-03T19:46:32.000Z","updated_at":"2025-03-11T05:12:09.000Z","dependencies_parsed_at":"2022-08-13T19:10:24.281Z","dependency_job_id":null,"html_url":"https://github.com/adnanrahic/boilerplate-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/adnanrahic/boilerplate-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adnanrahic%2Fboilerplate-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adnanrahic%2Fboilerplate-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adnanrahic%2Fboilerplate-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adnanrahic%2Fboilerplate-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adnanrahic","download_url":"https://codeload.github.com/adnanrahic/boilerplate-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adnanrahic%2Fboilerplate-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30287447,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T02:57:19.223Z","status":"ssl_error","status_checked_at":"2026-03-09T02:56:26.373Z","response_time":61,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["boilerplate","ci-support","circleci","docker","expressjs","heroku","javascript","mocha","mongodb","nodejs"],"created_at":"2024-10-17T01:26:34.390Z","updated_at":"2026-03-09T08:02:11.797Z","avatar_url":"https://github.com/adnanrahic.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lightweight Node.js Boilerplate API\n\nThis is a lightweight Node.js boilerplate API with Docker support, test coverage and circle.ci support.\n\n## Getting Started\n\nThese instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.\n\nClone to your local machine:\n```\ngit clone https://github.com/adnanrahic/boilerplate-api.git\n```\n\nChange into the cloned dir:\n```\ncd boilerplate-api\n```\n\nInstall required modules:\n```\nnpm install\n```\n\n#### Natively\nRun dev environment:\n```\nnpm run dev\n```\n\nRun tests:\n```\nnpm test\n```\n\nRun Istanbul/NYC test coverage report:\n```\nnpm run integration\n```\n\n#### Docker\n```\ndocker swarn init\ndocker stack deploy -c docker-compose boilerplate\n```\n\n### Prerequisites\n\nTo get up and running you can either install Docker and run the app in a container, or just run it natively. For Docker you need to install Docker and docker-compose.\n\nTo run natively, you need to install MongoDB and Node.js.\n\n### Installing\n\n#### Running natively\n\n1. Install Node.js\n```\ncurl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -\n\nsudo apt-get install -y nodejs\n```\n\n2. Install MongoDB\n```\nsudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6\n\necho \"deb [ arch=amd64,arm64 ] http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse\" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list\n\nsudo apt-get update\n\nsudo apt-get install -y mongodb-org\n```\n\n3. Run MongoDB\n```\nsudo service mongod start\n```\n*If needed, stop MongoDB with*: `sudo service mongod stop`\n\n\n#### Running with Docker\n\n1. Install Docker\n```\ncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -\n\nsudo add-apt-repository \"deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable\"\n\nsudo apt-get update\n\nsudo apt-get install -y docker-ce\n```\n\n2. Check if Docker is installed:\n```\nsudo systemctl status docker\n```\nShould be similar to:\n\n##### Output\n```\n● docker.service - Docker Application Container Engine\n   Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)\n   Active: active (running) since Sun 2016-05-01 06:53:52 CDT; 1 weeks 3 days ago\n     Docs: https://docs.docker.com\n Main PID: 749 (docker)\n```\n\n3. Install Docker Compose\n\nChoose the appropriate installation for your OS [here](https://docs.docker.com/compose/install/#install-compose).\n\n#### For Linux\n```\nsudo curl -L https://github.com/docker/compose/releases/download/1.16.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose\n\nsudo chmod +x /usr/local/bin/docker-compose\n\ndocker-compose --version\n```\n\nIf you get the version returned back the installation was successful.\n\n\n\n## Running the tests\n\nRunning the tests is simple. Just run:\n```\nnpm test\n```\nThis will start nodemon and run the tests every time you save a file.\nThis includes all the e2e tests and API tests which interact with the DB.\n\n### Integration tests\n\nThese tests run against a test db which will be cleared before and after the tests are run.\nFor running the integration tests on every push we run:\n```\nnpm run integration\n```\n\nThis command is run by CircleCi.\n\n## Deployment\n\nOn a VM:\n- See Installation with [Docker](#running-with-docker).\n\nOn Heroku:\n- Fork the repo and add it to your Heroku account. The Procfile is set up to run `npm start`.\n\n## Built With\n\n* [Express](https://expressjs.com/) - Fast, unopinionated, minimalist web framework for Node.js\n* [Node.js](https://nodejs.org/en/) - JavaScript on the Server\n* [MongoDB](https://www.mongodb.com/) - Building on the Best of Relational with the Innovations of NoSQL\n\n## Contributing\n\nPlease read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.\n\n## Integration testing\n\nWe use [CircleCi](https://circleci.com/) for integration testing. For the versions available, see the [their GitHub repo](https://github.com/circleci). \n\n## Authors\n\n* [**Adnan Rahić**](https://github.com/adnanrahic) - *Initial work*\n* [**Luka Pejović**](https://github.com/luka454) - *Initial work*\n\n\u003c!-- See also the list of [contributors](https://github.com/your/project/contributors) who participated in this project. --\u003e\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details\n\n## Acknowledgments\n\n* Mad props to [Luka Pejović](https://github.com/luka454) for helping me understand testing!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadnanrahic%2Fboilerplate-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadnanrahic%2Fboilerplate-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadnanrahic%2Fboilerplate-api/lists"}