Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yeukfei02/ecommerce-api-sequelize
ecommerce-api-sequelize
https://github.com/yeukfei02/ecommerce-api-sequelize
docker nestjs nodejs postgres sequelize typescript
Last synced: 5 days ago
JSON representation
ecommerce-api-sequelize
- Host: GitHub
- URL: https://github.com/yeukfei02/ecommerce-api-sequelize
- Owner: yeukfei02
- License: mit
- Created: 2022-10-03T05:47:43.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-15T14:45:06.000Z (about 1 year ago)
- Last Synced: 2024-11-12T05:13:30.837Z (2 months ago)
- Topics: docker, nestjs, nodejs, postgres, sequelize, typescript
- Language: TypeScript
- Homepage:
- Size: 159 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# ecommerce-api-sequelize
ecommerce-api-sequelize
documentation:
## Requirement
- install yarn
- install node (v16+)## Testing and run
```zsh
// test api in local
$ yarn run start:dev// run in production
$ yarn run start:prod// lint code
$ yarn run lint// format code
$ yarn run format// run test case
$ yarn run test// create module
$ nest g module// create controller
$ nest g controller// create service
$ nest g service// create migration file
$ npx sequelize-cli model:generate --name --attributes// run db migration
$ yarn run db:migrate// undo db migration
$ yarn run db:migrate:undo// check migrations status
$ yarn run db:migrate:status// create seed file
$ npx sequelize-cli seed:generate --name// seed data to database
$ yarn run db:seed
```## 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