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
- Host: GitHub
- URL: https://github.com/mingchuno/graphql-nexus-prisma-template
- Owner: mingchuno
- License: mit
- Created: 2020-06-17T09:53:50.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-06-17T09:54:13.000Z (about 6 years ago)
- Last Synced: 2025-07-07T00:40:08.358Z (12 months ago)
- Topics: graphql, koa, koa2, nexus, nexusjs, postgres, postgresql, prisma
- Language: TypeScript
- Size: 94.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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/
```