go-graphql

command module
v0.0.0-...-f9ced6f Latest Latest
Warning

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

Go to latest
Published: May 30, 2019 License: MIT Imports: 5 Imported by: 0

README

go-graphql

GoLang製のGraphQLサンプルプロジェクト

ローカル環境で動作させる

初回起動時

docker-compose up --build -d

2回目以降の起動時

docker-compose up

curl -g 'http://localhost:9998?query={user(id:"1"){name}}' で動作している事を確認出来る。

停止

docker-compose down

停止とDockerイメージの削除を同時に行う

docker-compose down --rmi all

本番環境で動作させる

以下のコマンドを実行しコンテナを立ち上げる。

docker build -t go-graphql .
docker run -p 8080:8080 -d --name go-graphql go-graphql

curl -g 'http://localhost:8080?query={user(id:"1"){name}}' で動作確認を行い問題なければDocker HubやECR等に反映させる。

コードの整形

go fmt

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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