https://github.com/yeukfei02/divisionly-api
split expenses with friends
https://github.com/yeukfei02/divisionly-api
hacktoberfest postgres rails rspec ruby ruby-on-rails
Last synced: 3 months ago
JSON representation
split expenses with friends
- Host: GitHub
- URL: https://github.com/yeukfei02/divisionly-api
- Owner: yeukfei02
- License: mit
- Created: 2021-11-03T10:24:25.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-12-15T17:23:57.000Z (over 2 years ago)
- Last Synced: 2025-02-28T11:53:45.214Z (over 1 year ago)
- Topics: hacktoberfest, postgres, rails, rspec, ruby, ruby-on-rails
- Language: Ruby
- Homepage:
- Size: 1.91 MB
- 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

divisionly-api
split expenses with friends
documentation:
## Requirement
- install ruby (v2.7.4)
- 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
// run rails console
$ rails c
// 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
// run db seed
$ rails db:seed
// create worker file
$ rails g sidekiq:worker
// create mailer file
$ rails g mailer
// list routes
$ rails routes
// run test case
$ bundle exec rspec
// start sidekiq
$ bundle exec sidekiq
// rubocop
$ rubocop --auto-correct
$ rubocop -A
// reek
$ reek
// generate schema info in model
$ annotate --models
// audit Gemfile.lock
$ bundler-audit
```
## 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