Skip to content

Commit

Permalink
Update README.md: add git clone command (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
regeda authored Mar 29, 2024
1 parent 81a03f3 commit 781080c
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 14 deletions.
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,15 @@ export PG_URI := postgresql://$(PG_DSN)

GOFLAGS ?=

$(GOBIN):
mkdir -p $(GOBIN)
.PHONY: default
default: docker-down docker-up clean lint tidy migrate-up generate test run

$(GOBIN)/golangci-lint: $(GOBIN)
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOBIN) v$(GOLANGLINT_VERSION)

$(GOBIN):
mkdir -p $(GOBIN)

.PHONY: clean
clean:
rm -rf $(GOBIN)
Expand Down
34 changes: 28 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,50 @@ Connect to your database and generate the GraphQL schema:
PG_URI='postgres://localhost:5432/postgres?sslmode=disable' turboqlgen
```

## Example
> Run `turboqlgen --help` for help on the documentation.
> Or [Create a new issue](https://github.com/regeda/turboql/issues/new).
## Playground

Clone [our](https://github.com/regeda/turboql) repository:
```
git clone https://github.com/regeda/turboql.git
```

Explore the [Bookstore](/examples/bookstore) example.

The following `Makefile` commands will help you to start from a scratch:
The following `Makefile` commands will help you to **start from a scratch**:

### Default Mode

Execute the following command from the repository's root where [`Makefile`](/Makefile) is located:

```
make
```

### Launch the database

Make sure before that your Docker or a virtual machine with the Docker are running!
1. [Rancher Desktop](https://rancherdesktop.io/)
2. [Docker Engine](https://docs.docker.com/engine/install/)

Launch the database:
```
make docker-up
```

Migrate the database schema:
### Migrate the database schema
```
make migrate-up
```

Generate the GraphQL schema:
### Generate the GraphQL schema
```
make generate
```

Run the web application:
### Run the web application
```
make run
```

4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ require (
github.com/kr/text v0.2.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rogpeppe/go-internal v1.12.0 // indirect
golang.org/x/crypto v0.17.0 // indirect
golang.org/x/sync v0.5.0 // indirect
golang.org/x/crypto v0.21.0 // indirect
golang.org/x/sync v0.6.0 // indirect
golang.org/x/text v0.14.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k=
golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=
golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE=
golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA=
golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs=
golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
Expand Down

0 comments on commit 781080c

Please sign in to comment.