graphql-engine/cli
Shahidh K Muhammed 76ceb707f4
bundle console assets into server (close #516, close #521, close #2130) (#2192)
This PR builds console static assets into the server docker image at `/srv/console-assets`. When env var `HASURA_GRAPHQL_CONSOLE_ASSETS_DIR=/srv/console-assets` or flag `--console-assets-dir=/srv/console-assets` is set on the server, the files in this directory are served at `/console/assets/*`.

The console html template will have a variable called `cdnAssets: false` when this flag is set and it loads assets from server itself instead of CDN.

The assets are moved to a new bucket with a new naming scheme:

```
graphql-engine-cdn.hasura.io/console/assets/
   /common/{}
   /versioned/<version/{}
   /channel/<channel>/<version>/{}
```

Console served by CLI will still load assets from CDN - will fix that in the next release.
2019-05-16 13:15:29 +05:30
..
assets bundle console assets into server (close #516, close #521, close #2130) (#2192) 2019-05-16 13:15:29 +05:30
build [cli] add docs and build tools (#3) 2018-06-28 11:10:18 +05:30
cmd/hasura fix typos is multiple files (#728) 2018-10-15 12:29:51 +05:30
commands support allow-list for graphql queries (closes #989) (#2075) 2019-05-16 11:43:25 +05:30
migrate add an api to dump postgres schema (close #1939) (#1967) 2019-04-30 14:04:08 +05:30
telemetry infer topic based on version set in telemetry struct (#1511) 2019-01-29 10:37:22 +05:30
update add update-cli command to cli (close #1239) (#1251) 2019-02-04 16:21:29 +05:30
util rename access-key to admin-secret (close #1347) (#1540) 2019-02-14 15:07:47 +05:30
version bundle console assets into server (close #516, close #521, close #2130) (#2192) 2019-05-16 13:15:29 +05:30
.gitignore [cli] commit realize, update docs 2018-06-28 11:35:34 +05:30
.realize.yaml cli: updates to support console versioning etc (#30) 2018-07-03 14:54:46 +05:30
cli_test.go rename access-key to admin-secret (close #1347) (#1540) 2019-02-14 15:07:47 +05:30
cli.go accept a json or yaml file for metadata apply command (close #1698) (#1746) 2019-03-20 10:40:06 +05:30
CONTRIBUTING.md fix cli contrib instructions (#1958) 2019-04-11 09:15:18 +05:30
directory.go rename access-key to admin-secret (close #1347) (#1540) 2019-02-14 15:07:47 +05:30
get.sh cli: add new install script, commands (#1556) 2019-02-05 18:21:21 +05:30
global_config.go rename access-key to admin-secret (close #1347) (#1540) 2019-02-14 15:07:47 +05:30
Gopkg.lock add update-cli command to cli (close #1239) (#1251) 2019-02-04 16:21:29 +05:30
Gopkg.toml add update-cli command to cli (close #1239) (#1251) 2019-02-04 16:21:29 +05:30
Makefile add update-cli command to cli (close #1239) (#1251) 2019-02-04 16:21:29 +05:30
README.md rename access-key to admin-secret (close #1347) (#1540) 2019-02-14 15:07:47 +05:30

Hasura GraphQL Engine CLI

GoDoc

Installation

Download GraphQL Engine CLI bundled with Hasura CLI

  • Linux/macOS
curl -L https://cli.hasura.io/install.sh | bash

Download using go get

go get github.com/hasura/graphql-engine/cli/cmd/hasura

Build from source

git clone https://github.com/hasura/graphql-engine
cd graphql-engine/cli
make deps
make build
# binaries will be in _output directory

Usage

hasura init --directory <my-project> --endpoint <graphql-endpoint> --admin-secret <admin-secret>
cd <my-project>
hasura console

Contributing

Checkout the contributing guide.