Blook

published: 3/13/2019last updated: 3/26/2019

Rails Api App setup

*Goal of this chapter

  • Just Create Rails Api app

rails new rails-api-graphql-crud-tuto --api -T --database=postgresql
cd rails-api-graphql-crud-tuto
rails db:create
git init
git add .
git commit -m "Initial Commit"

-T option is for...

rails -h ... -T, [--skip-test], [--no-skip-test] # Skip test files

Gem for auto check

  1. annotate_models - Annotate Rails classes with schema and routes info

1 annotate_models​

To automatically annotate every time you run db:migrate

group :development do
gem 'annotate'
end

bundle
rails g annotate:install
Running via Spring preloader in process 53096
create lib/tasks/auto_annotate_models.rake

ref https://github.com/ctran/annotate_models#configuration-in-rails

Finish!