https://github.com/jacob-ebey/go-graphql-boilerplate
A simple to use, deploys anywhere boilerplate to get you going in GO and GraphQL.
https://github.com/jacob-ebey/go-graphql-boilerplate
Last synced: about 1 year ago
JSON representation
A simple to use, deploys anywhere boilerplate to get you going in GO and GraphQL.
- Host: GitHub
- URL: https://github.com/jacob-ebey/go-graphql-boilerplate
- Owner: jacob-ebey
- Created: 2019-10-19T10:02:42.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-05T12:37:50.000Z (over 3 years ago)
- Last Synced: 2025-04-01T20:18:16.276Z (about 1 year ago)
- Language: Go
- Homepage: https://jacob-ebey.js.org/go-graphql-boilerplate/
- Size: 1.44 MB
- Stars: 28
- Watchers: 2
- Forks: 1
- Open Issues: 21
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GO GraphQL Boilerplate
A simple to use, deploys anywhere boilerplate to get you going in GO and GraphQL.
Zeit Now Example: https://go-graphql-boilerplate.jacob-ebey.now.sh/
Heroku Example: https://go-graphql-boilerplate.herokuapp.com/
## Getting started
Get started by installing GO and Node(NPM), then cloneing this repo.
Once cloned, install the GO dependencies:
```shell
> go get ./...
```
CD into the `frontend` directory and install the NPM dependencies:
```shell
> npm install
```
## Dev mode
Create A .env file in the root of the project, feel free to copy or rename the .env.example file. This is pre-configured for use with the docker-compose.yml file provied.
Configure a combination of the following properties:
```
DATABASE_URL="postgres://postgres@localhost:54320/postgres"
POSTGRESS_ADDRESS="localhost:54320"
JWT_SECRET="your-jwt-secret"
GO_SERVES_STATIC="true"
ENVIRONMENT="development"
PORT="8080"
```
OR
```
POSTGRESS_ADDRESS="localhost:54320"
POSTGRESS_DATABASE="postgres"
POSTGRESS_USER="postgres"
POSTGRESS_PASSWORD=""
JWT_SECRET="your-jwt-secret"
GO_SERVES_STATIC="true"
ENVIRONMENT="development"
PORT="8080"
```
Both of the above configs are valid for the docker-compose.yml file provided. To spin up your DB, run:
```bash
> docker-compose up -d
```
Now we can start the GO backend. In if `ENVIRONMENT` is set to development, we will get auto rebuilding of the frontend.
## Production
You have a few options for deploying the boilerplate out of the box:
- [Azure](docs/azure.md)
- [Heroku](docs/heroku.md)
- [Zeit Now](docs/zeit-now.md)