This is prof of concept which combines Grape and ActiveRecord.
In most projects I've been working recently I use Rails and Grape, and I mostly write APIs in Grape because of generated Swagger documentation. I use ActiveRecord and DB related Rake tasks from the Rails, which leads me to compose stack without components I don't use.
Commands
NOTE: By default environment is production unless specified differently.
You can set desired environment using RACK_ENV=something
.
E.g. RACK_ENV=development rackup
bin/grail console
- IRB in project context with bootstrapped environmentrackup
- start Puma web server usingshotgun
- start development Puma web server with code reloading feature, sets development environment by defaultrake db:*
- All ActiveRecord DB tasksrake environment
- Task to setup environment, dependency for ActiveRecord tasksrake generate:migration[name]
- Generate ActiveRecord migrationrspec
- Run RSpec, sets test environment by default