{"id":15914781,"url":"https://github.com/droidpl/miniplate-docker-mongo-node-backend","last_synced_at":"2026-01-12T11:00:49.897Z","repository":{"id":51949710,"uuid":"153753110","full_name":"droidpl/miniplate-docker-mongo-node-backend","owner":"droidpl","description":"Minimal backend bootstraping with nodejs and mongodb. Includes migrations","archived":false,"fork":false,"pushed_at":"2023-01-11T22:22:15.000Z","size":1486,"stargazers_count":0,"open_issues_count":7,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-04-03T03:44:42.109Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/droidpl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-19T08:44:50.000Z","updated_at":"2019-11-21T08:27:56.000Z","dependencies_parsed_at":"2023-02-09T08:16:46.290Z","dependency_job_id":null,"html_url":"https://github.com/droidpl/miniplate-docker-mongo-node-backend","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/droidpl/miniplate-docker-mongo-node-backend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/droidpl%2Fminiplate-docker-mongo-node-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/droidpl%2Fminiplate-docker-mongo-node-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/droidpl%2Fminiplate-docker-mongo-node-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/droidpl%2Fminiplate-docker-mongo-node-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/droidpl","download_url":"https://codeload.github.com/droidpl/miniplate-docker-mongo-node-backend/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/droidpl%2Fminiplate-docker-mongo-node-backend/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28338923,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T10:58:46.209Z","status":"ssl_error","status_checked_at":"2026-01-12T10:58:42.742Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":[],"created_at":"2024-10-06T17:06:35.896Z","updated_at":"2026-01-12T11:00:49.877Z","avatar_url":"https://github.com/droidpl.png","language":"JavaScript","readme":"# Minimal docker-mongo-node boilerplate\n\nThis boilerplate contains the minimal configuration I usually use fro the backend projects\nbased on mongodb.\n\nThis configuration is as follow:\n\n- Docker: contains docker-compose and docker images for the migrations, database and application\n- Mongo: it contains an image for mongodb with 0 setup time\n- Node: contains a fully divided Node app with an example of 1 web service\n- Documentation: contains a swagger folder with the documentation\n- File bootstrap: contains the scheleton of any app with the most default libraries, such as mongoose and lodash\n- Contains a custom validator to help you validate your input\n\nThis boilerplate has been used in multiple projects and allow flexibility to get started\nwithout removing a huge amount of code.\n\n## How to run it\n\nThe application can be run either using docker or directly with npm and docker. I will divide this in two\nsections, one for development and one for release to a server.\n\n### Development\n\nTo run in development its better to just run locally the database and connect\nagainst it using intellij or any other editor at your choice but without building the\ncontainer as it would be more tedious.\n\nTo run the database do:\n\n```$xslt\ndocker-compose build\ndocker-compose up -d mongodb migrations\n```\n\nThen with this running you can execute your app using:\n```$xslt\ncd miniplate\nnpm install\nnpm run start:dev (or start:prod if you don't want hot reloading)\n```\n\nOr connect directly with your preferred ide and debugger. You can check if it worked running:\n```\nhttp://localhost:3001/api/success\nor\nhttp://localhost:3001/api/failure\n```\n\n### Release\n\nReleasing it to a server is as easy as running the docker images generated. You can do it with\ndocker compose or kubernetes or any other container management tool at your decision.\n\nUse the following command:\n\n```$xslt\ndocker-compose build\ndocker-compose up -d api\n```\n\nThis will automatically bring the migrations, mongodb and application in the proper\norder to life.\n\nThe default port is ``3001`` and the url is http://localhost:3001.\n\n### Adding a new environment with migrations\n\nIf you want to add a new environment the files that you need to change are:\n\n- ``db-migrations/package.json``: add a new migrations run command with the file created before\n- ``docker-compose.environment.yml``: point to the new environment to do the migrations properly\n- ``db-migrations/configs/environment-migrations.json``: create your own environment for the migrations\n\nTo run this with docker you can do:\n\n```$xslt\ndocker-compose build\ndocker-compose -f docker-compose.yml -f docker-compose.environment.yml up -d api\n```\n\n## Customizing for your project\n\nThe boilerplate is setup in a way that you can just replace the word ```miniplate``` for \nthe name of your project and all should still work with all the variables setup for you actual\nnaming.\n\n## Documentation\n\nThe project also contains documentation for the API. For that you can just enter ``localhost:3001/docs`` and it will display\nthe theme for the documentation. Edit tje file ``miniplate/docs/api.json`` to create the proper swagger documentation","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdroidpl%2Fminiplate-docker-mongo-node-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdroidpl%2Fminiplate-docker-mongo-node-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdroidpl%2Fminiplate-docker-mongo-node-backend/lists"}