{"id":14967437,"url":"https://github.com/lucasctnh/multidb-nodebr","last_synced_at":"2026-01-31T13:08:49.371Z","repository":{"id":42322741,"uuid":"208151331","full_name":"lucasctnh/MultiDB-NodeBR","owner":"lucasctnh","description":"RESTful api with authentication and multi-databases, following the NodeBR course","archived":false,"fork":false,"pushed_at":"2022-12-30T18:39:30.000Z","size":560,"stargazers_count":0,"open_issues_count":14,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-14T07:45:19.303Z","etag":null,"topics":["bcryptjs","hapi-swagger","hapijs","istanbul","joi-validation","jwt","mochajs","mongodb","mongoosejs","multidatabase","nodebr","nodebr-project","nodejs","pm2","postegresql","sequelize"],"latest_commit_sha":null,"homepage":"https://projetomultidb-postgres.herokuapp.com","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/lucasctnh.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}},"created_at":"2019-09-12T21:42:35.000Z","updated_at":"2021-01-01T05:04:25.000Z","dependencies_parsed_at":"2023-01-31T13:16:01.632Z","dependency_job_id":null,"html_url":"https://github.com/lucasctnh/MultiDB-NodeBR","commit_stats":null,"previous_names":["lucasctnh/multidb-nodebr"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lucasctnh/MultiDB-NodeBR","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucasctnh%2FMultiDB-NodeBR","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucasctnh%2FMultiDB-NodeBR/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucasctnh%2FMultiDB-NodeBR/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucasctnh%2FMultiDB-NodeBR/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lucasctnh","download_url":"https://codeload.github.com/lucasctnh/MultiDB-NodeBR/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucasctnh%2FMultiDB-NodeBR/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260683514,"owners_count":23046075,"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":["bcryptjs","hapi-swagger","hapijs","istanbul","joi-validation","jwt","mochajs","mongodb","mongoosejs","multidatabase","nodebr","nodebr-project","nodejs","pm2","postegresql","sequelize"],"created_at":"2024-09-24T13:38:03.479Z","updated_at":"2026-01-31T13:08:49.327Z","avatar_url":"https://github.com/lucasctnh.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## MultiDB project\nThis project uses both *MongoDB* and *PostgreSQL* as database. The architecture is based on the strategy design pattern with *Mocha.js* as test environment tool and *Istanbul* for code coverage, *Hapi.js* as structure and to handle with HTTP protocols, and *Json Web Token* with *Bcrypt* for users validation. This project was made for the **NodeBR** course of *Node.js*.\n\n### Run locally\nTo run locally you'll have to start containers in *Docker*, to do it you can type in the following commands: \n```sh \ndocker run --name postgres -e POSTGRES_USER=user -e POSTGRES_PASSWORD=senhauser -e POSTGRES_DB=heroes -p 5432:5432 -d postgres\ndocker run --name adminer -p 8080:8080 --link postgres:postgres -d adminer\ndocker run --name mongodb -p 27017:27017 -e MONGO_INITDB_ROOT_USERNAME=admin -e MONGO_INITDB_ROOT_PASSWORD=senhaadmin -d mongo:4\ndocker run --name mongoclient -p 3000:3000 --link mongodb:mongodb -d mongoclient/mongoclient\ndocker exec -it mongodb mongo --host localhost -u admin -p senhaadmin --authenticationDatabase admin --eval \"db.getSiblingDB('herois').createUser({user: 'user', pwd: 'senhauser', roles: [{role: 'readWrite', db: 'herois'}]})\"\n```\n\nWith the containers up you can ``npm install`` to install all dependencies, and ``npm t`` to initalize everything, run the tests and start the server. You can also call ``npm run test:prod`` to test the production environment instead of the development one.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucasctnh%2Fmultidb-nodebr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucasctnh%2Fmultidb-nodebr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucasctnh%2Fmultidb-nodebr/lists"}