Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mishnit/Grab
Backend for E-commerce using Go microservices, GRPC, Protobuf, Postgresql, Elastic search, Docker and GraphQL
https://github.com/mishnit/Grab
docker elasticsearch go golang gqlgen graphql grpc microservice postgresql protobuf
Last synced: 3 months ago
JSON representation
Backend for E-commerce using Go microservices, GRPC, Protobuf, Postgresql, Elastic search, Docker and GraphQL
- Host: GitHub
- URL: https://github.com/mishnit/Grab
- Owner: mishnit
- Created: 2019-09-03T15:45:36.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2019-11-15T08:14:10.000Z (almost 5 years ago)
- Last Synced: 2024-05-18T01:59:24.986Z (6 months ago)
- Topics: docker, elasticsearch, go, golang, gqlgen, graphql, grpc, microservice, postgresql, protobuf
- Language: Go
- Homepage:
- Size: 42 KB
- Stars: 39
- Watchers: 2
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-golang-repositories - Grab - commerce using Go microservices, GRPC, Protobuf, Postgresql, Elastic search, Docker and GraphQL (Repositories)
README
# Grab
Grab: Online store based on Go microservices, GRPC, protobuf, postgresql, elastic search and GraphQL.
## create pb files
```
$ go generate catalog/server.go
$ go generate account/server.go
$ go generate order/server.go
```## create gqlgen generated file [DO NOT DO THIS]
Note: (first make backup of graph folder before doing so or please do not re-generate this again as this will remove all the modifications made to the resolvers inside this folder, you will be bombarded with errors)
```
$ sudo go generate graphql/graph/graph.go
```## update go.mod and go.sum files
```
$ go mod tidy
```## Build
install all the dependencies from go.mod into vendor folder
```
$ go mod vendor
$ docker-compose up -d --build
```Open in your browser.
or
Try sending Post request for query and mutation to in postman.## Accesing postgres from docker container
```
$ docker ps (copy container id where postgres is running)
$ docker exec -it bash
$root@05b3a3471f6f:/# psql -U
$ \dt (look for schema name and table name)
$ SELECT * FROM .; (Example: SELECT * FROM public.orders;)
$ \q
$ exit
```