https://github.com/yeukfei02/dogapi
dogApi
https://github.com/yeukfei02/dogapi
dog dogapi koa nodejs postgres prisma typescript
Last synced: about 1 month ago
JSON representation
dogApi
- Host: GitHub
- URL: https://github.com/yeukfei02/dogapi
- Owner: yeukfei02
- License: mit
- Created: 2020-06-20T04:31:12.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T05:12:22.000Z (over 2 years ago)
- Last Synced: 2025-06-06T15:52:14.686Z (12 months ago)
- Topics: dog, dogapi, koa, nodejs, postgres, prisma, typescript
- Language: TypeScript
- Homepage:
- Size: 515 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# dogApi
dogApi
documentation:
## Requirement
- install yarn
- install node (v14+)
- install postgres
## Testing and run
```zsh
$ yarn
// development
$ yarn run dev
// production
$ yarn run start
// run test case
$ yarn run test
// lint code
$ yarn run lint
// format code
$ yarn run format
// 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
// format schema.prisma
$ yarn run prisma:format
// open prisma studio
$ yarn run prisma:studio
```
## Docker
```zsh
// build images and start container in one line
docker-compose up -d --build
// go inside container
docker exec -it /bin/bash
// check container logs
docker logs
// remove and stop container
docker-compose down
```
open localhost:3000
## Contributing
Please refer to [CONTRIBUTING.md](https://github.com/yeukfei02/dogApi/blob/master/CONTRIBUTING.md)