This is a simple backend for an e-commerce platform with API endpoint implemented in GraphQL This server is built on top of the graphql-go implmentation
- Go -- Development environment
- dep -- Dependency management
- Docker
- Docker Compose
go get -u github.com/shredx/ep2-golang-graphql-backend
cd $GOPATH/github.com/shredx/ep2-golang-graphql-backend
dep ensure
docker-compose up
To know the name of the container run the following command
docker ps
As per docker compose configuration name of the docker container should be ep2-golang-graphql-backend_ecommerce-mysql_1
Login into the mysql created in the docker.
docker exec -it ep2-golang-graphql-backend_ecommerce-mysql_1 mysql -uroot -proot
Now create the database called ecommerce
create database ecommerce;
Follow the usage doc