https://github.com/yeukfei02/multivendor-api
multivendor-api
https://github.com/yeukfei02/multivendor-api
apollo-server aws-lambda graphql hacktoberfest nexus nodejs postgres prisma serverless typescript
Last synced: 7 months ago
JSON representation
multivendor-api
- Host: GitHub
- URL: https://github.com/yeukfei02/multivendor-api
- Owner: yeukfei02
- License: mit
- Created: 2021-12-17T13:54:49.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-12-15T08:33:04.000Z (over 2 years ago)
- Last Synced: 2025-02-28T11:53:44.383Z (about 1 year ago)
- Topics: apollo-server, aws-lambda, graphql, hacktoberfest, nexus, nodejs, postgres, prisma, serverless, typescript
- Language: TypeScript
- Homepage:
- Size: 967 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# multivendor-api
multivendor-api
documentation:
api url dev:
api url prod:
## Requirement
- install yarn
- install node (v14+)
- install serverless
## Testing and run
```zsh
// test api in local
$ yarn run dev
// deploy to serverless
$ yarn run deploy
// open serverless dashboard
$ yarn run dashboard
// lint code
$ yarn run lint
// format code
$ yarn run format
// run test case
$ yarn run test
// remove serverless services in aws (api gateway, lambda, s3, cloudformation)
$ yarn run remove
// generate schema.graphql
$ yarn run generate:nexus
// generate schema.prisma and prisma client
$ yarn run prisma:generate
// create migration file if schema.prisma changed
$ yarn run prisma:migrate:dev
// reset database
$ yarn run prisma:migrate:reset
// apply pending migrations in the production/staging database
$ yarn run prisma:migrate:deploy
// check migrations status in the production/staging database
$ yarn run prisma:migrate:status
// push schema.prisma state to database
$ yarn run prisma:db:push
// seed data to database
$ yarn run prisma:db:seed
// validate schema.prisma
$ yarn run prisma:validate
// format schema.prisma
$ yarn run prisma:format
// open prisma studio
$ yarn run prisma:studio
```