Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yeukfei02/ecommerce-api
ecommerce-api
https://github.com/yeukfei02/ecommerce-api
activeadmin postgres rails rspec ruby ruby-on-rails
Last synced: about 1 month ago
JSON representation
ecommerce-api
- Host: GitHub
- URL: https://github.com/yeukfei02/ecommerce-api
- Owner: yeukfei02
- License: mit
- Created: 2021-04-03T04:42:05.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-12-15T02:36:08.000Z (about 1 year ago)
- Last Synced: 2024-05-09T16:14:00.011Z (8 months ago)
- Topics: activeadmin, postgres, rails, rspec, ruby, ruby-on-rails
- Language: Ruby
- Homepage:
- Size: 364 KB
- Stars: 0
- 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
ecommerce-api
documentation:
## Requirement
- install ruby (v2.7.6)
- install gem
- install bundle
- install yarn
- install node (v14+)## Testing and run
```zsh
// install ruby dependencies
$ bundle install// install node dependencies
$ yarn// run api in local
$ rails s// create controller
$ rails g controller// create model
$ rails g model// create migration file
$ rails g migration// db migration
$ rails db:migrate// db rollback
$ rails db:rollback// db reset
$ rails db:migrate:reset// list routes
$ rails routes// run test case
$ bundle exec rspec// rubocop
$ rubocop --auto-correct
$ rubocop -A// reek
$ reek// generate schema info in model
$ annotate --models// audit Gemfile.lock
$ bundler-audit
```## ActiveAdmin
```zsh
// create admin view
$ rails g active_admin:resource// open localhost:3000/admin
email: [email protected]
password: adminadmin
```## Docker
```zsh
// build images and start container in one line
docker-compose up -d --build// run db migration in container
docker-compose exec web bundle exec rails db:migrate// go inside container
docker exec -it /bin/bash// check container logs
docker logs// remove and stop container
docker-compose down
```open localhost:3000