Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/luanmbrito/NodeJS-Postgresql-Mongodb
https://github.com/luanmbrito/NodeJS-Postgresql-Mongodb
Last synced: about 18 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/luanmbrito/NodeJS-Postgresql-Mongodb
- Owner: luanmbrito
- Created: 2019-07-24T03:29:40.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-30T18:18:17.000Z (almost 2 years ago)
- Last Synced: 2024-08-03T07:02:51.751Z (4 months ago)
- Language: JavaScript
- Size: 162 KB
- Stars: 0
- Watchers: 0
- Forks: 3
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
#NodeJS,Postgresql,MongoDB,Docker,Mocha,Mongoose e Sequelize
esse projeto foi feito no curso nodebr
instale as dependencias com npm install
o projeto foi desenvolvido utilizando:
docker para os bancos de dados mongodb e postgresql
mocha para tdd
Sequelize para utilizar potgresql como banco de dados orientado a objeto
Mongoose para utilizar o mongodb
Docker para utilizar as imagens imagens do mongodb e postgresql e agilizar o desenvolvimento#Docker
segue abaixo os comandos para implementar as imagens do mongodb,mongoclient,postgresql e adminerdocker run \
--name postgres \
-e POSTGRES_USER=luan \
-e POSTGRES_PASSWORD=luan \
-e POSTGRES_DB=heroes \
-p 5432:5432 \
-d \
postgresdocker ps
docker exec -it postgres /bin/bashdocker run \
--name adminer \
-p 8080:8080 \
--link postgres:postgres \
-d \
adminer##--------MONGODB
doker run \
--name mongodb \
-p 27017:27017 \
-e MONGO_INITDB_ROOT_USERNAME=admin \
-e MONGO_INITDB_ROOT_PASSWORD=admin \
-d \
mongo:4docker run \
--name mongoclient \
-p 3000:3000 \
-link mongodb:mongodb \
-d \
mongoclien/mongoclientdocker exec -it mongodb \
mongo --host localhost -u admin -p admin --authenticationDatabase admin \
--eval "db.getSiblingDB('herois').createUser((user: 'luan', pwd: 'luan', roles:({role: 'readWrite, db: 'herois'})))"