Skip to content

Latest commit

 

History

History
38 lines (33 loc) · 1.21 KB

README.md

File metadata and controls

38 lines (33 loc) · 1.21 KB

Episode 2 Golang GraphQL Backend

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

Getting Started

Prerequisite

Installation

Setting up the environment

go get -u github.com/shredx/ep2-golang-graphql-backend
cd $GOPATH/github.com/shredx/ep2-golang-graphql-backend
dep ensure
docker-compose up

Configuring a database

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;

Usage

Follow the usage doc