An open API service indexing awesome lists of open source software.

https://github.com/mingchuno/graphql-nexus-prisma-template

Template project for nexus x prisma x Koa x graphql x postgres
https://github.com/mingchuno/graphql-nexus-prisma-template

graphql koa koa2 nexus nexusjs postgres postgresql prisma

Last synced: 2 months ago
JSON representation

Template project for nexus x prisma x Koa x graphql x postgres

Awesome Lists containing this project

README

          

# graphql-nexus-prisma-starter

## Get started

### Prerequisite

* `node` >= 12
* `yarn`
* `docker` and `docker-compose`

### Development

```
yarn install
# start database
docker-compose up -d
# migrate schema
yarn migrate:up
# seed the database
yarn seed
# start development server
yarn dev
# production build
yarn build
```

## Update schema

1. Make change to `prisma/schema.prisma`
2. Run `yarn migrate:save && yarn migrate:up`
3. Run `yarn generate` to generate client

## Docker support

```bash
# build docker image
docker build -t graphql-nexus-prisma-starter .
# run in local with config mount as volume
docker run -it --rm -p "127.0.0.1:4000:4000" \
graphql-nexus-prisma-starter
# test the server
curl -vL http://localhost:3000/
```