gqlgen-todoapp

module
v0.0.0-...-9ac15d8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 6, 2020 License: MIT

README

gqlgen-todoapp

Demo app using gqlgen.

Requirements

  • golang
  • docker
  • sqlboiler
  • migrate
  • mysql
# Install sqlboiler CLI
go get -u -t github.com/volatiletech/sqlboiler
go get github.com/volatiletech/sqlboiler/drivers/sqlboiler-mysql

# Install migrate CLI
go get -u -d github.com/golang-migrate/migrate/cmd/migrate
cd $GOPATH/src/github.com/golang-migrate/migrate/cmd/migrate
git checkout $TAG  # e.g. v4.1.0
go build -tags 'postgres' -ldflags="-X main.Version=$(git describe --tags)" -o $GOPATH/bin/migrate github.com/golang-migrate/migrate/cmd/migrate

Build

git clone https://github.com/moutend/gqlgen-todoapp
cd ./gqlgen-todoapp

./bin/setup.bash
./bin/up.bash
./bin/sqlboiler.bash

cd ./cmd/todoapp
go build
go install

Test

Open a terminal and then run the command:

todoapp -c config/common.toml

Now the GraphQL playground is available. Open the browser, go to localhost:8080.

Or, open another terminal and then run the command:

./bin/create_user.bash
./bin/create_task.bash
./bin/tasks.bash

LICENSE

MIT

Directories

Path Synopsis
cmd
internal
app
graph
This file will not be regenerated automatically.
This file will not be regenerated automatically.
jwt

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL