Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/leylahosseini/gin-mongo-api-hazelcast
gin-mongodb-api-hazelcast
https://github.com/leylahosseini/gin-mongo-api-hazelcast
gin golang hazelcast hazelcast-client mongodb restful-api
Last synced: about 1 month ago
JSON representation
gin-mongodb-api-hazelcast
- Host: GitHub
- URL: https://github.com/leylahosseini/gin-mongo-api-hazelcast
- Owner: leylahosseini
- Created: 2023-09-28T12:55:27.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-29T07:47:50.000Z (about 1 year ago)
- Last Synced: 2024-07-30T18:44:56.114Z (5 months ago)
- Topics: gin, golang, hazelcast, hazelcast-client, mongodb, restful-api
- Language: Go
- Homepage:
- Size: 19.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gin-mongo-api-hazelcast
Build a REST API with Golang and MongoDB - Gin-gonic Version
This repository shows the source code for building a user management application with Golang using the Gin-gonic framework and MongoDB And Hazelcast .
## First:
$- docker-compose up -d## Second:
## Run This Command Into mongodb-1 shell$- docker exec -it mongodb-1 sh
$- mongod --replSet rs0 --bind_ip_all
$- mongosh --eval "rs.initiate({_id: \"rs0\",members: [{_id: 0, host: \"mongodb\"},{_id: 1, host: \"mongodb2\"}]})"## Three:
$- docker exec -it mongodb-2 sh
$- mongod --replSet rs0 --bind_ip_all## Four:
$- docker-compose up -d mongoimport
## Five:
$- go run main.go
### It is integrated with Hazelcast And when the program is running, it automatically reads the data from the database using a goroutine and maps it into Hazelcast. Also, if new data is added, it is automatically added to the Hazelcast map.