A GraphQL API backed by a Neo4J DB built in Go running in a docker container with available code hotswap and Delve Go debugger for remote debugging
Clone the project in the src folder of your $GOPATH
Open a terminal in the project folder and use
docker-compose buildordocker-compose build -e hotswap=1 debug=0to build the docker images (replace the 0 with 1 depending on what features you want the container to have enabled). Hotswap and debug are turned off by default.Once the images are finished building run
docker-compose upto spin up the containersOnce the docker containers are running graphql is ready to be used.
To navigate to the graphiql GUI open a browser and go to
http://localhost:9000/graphiqlTo navigate to the neo4j GUI open a browsr and go to
http://localhost:7474/browser/To programaticaly access the graphql API make http requests to
http://localhost:9000/graphql
When running the project in debug mode in the container you can connect to the debugger remotely at the following address localhost:2345
When running the project with the hotswap app listening for changes the project will get rebuild everytime a go file is changed.
To ssh into a running container use docker exec -ti <put container id here> sh
Neo4J - The Internet-Scale, Native Graph Database (https://neo4j.com/)
graphql-go/graphql - An implementation of GraphQL for Go / Golang (https://github.com/graphql-go/graphql)
Golang - Go is an open source programming language that makes it easy to build simple, reliable, and efficient software. (https://golang.org/)
Delve - Delve is a debugger for the Go programming language. The goal of the project is to provide a simple, full featured debugging tool for Go. (https://github.com/derekparker/delve)
Fresh - Fresh is a command line tool that builds and (re)starts your web application everytime you save a Go or template file. (https://github.com/pilu/fresh)
Docker - Docker is an open platform for developers and sysadmins to build, ship, and run distributed applications, whether on laptops, data center VMs, or the cloud (https://www.docker.com/)
Figure out a way to run hotswap and the remote debugger at the same time (dlv attach to the new PID after refresh ?)
Figure out why running the project in debug mode automaticaly trigers a breakpoint and halts the program at the first line of code in the main function of the main.go file