- copy example database connection configuration file
cp config/database.yml.example config/database.yml
- create development and test databases and fill in a configuration file
config/database.yml
- run migrations
rake db:migrate
- copy example ENV configuration file
cp config/env.yml.example config/env.yml
- fill in a ENV configuration file
- run server
puma -C config/puma.rb
- to jump into development console just type
bin/console
- you can use
binding.pry
anytime and anywhere in the app
- graphiQL explorer is available under http://localhost:3000/graphiql
- to create GraphQL API changelog just run
rake graphql:schema:dump
- application has already preconfigured rspec, so do as usual
rspec spec
- application has already preconfigured github actions, firing up on every Pull Request
- generate migration file
rake generate:migration i-am-the-migration-name
- fill in created migration (db/migrations), for instance:
Sequel.migration do
change do
run 'CREATE EXTENSION "uuid-ossp"'
create_table(:artists) do
column :id, :uuid, default: Sequel.function(:uuid_generate_v4), primary_key: true
String :name, null: false
DateTime :created_at, null: false, default: Sequel.function(:now)
DateTime :updated_at, null: false, default: Sequel.function(:now)
end
end
end
- run migration
rake db:migrate