Skip to content
LovroColic edited this page May 31, 2022 · 3 revisions

Welcome to the lago-api wiki!

Local Environment Setup

To install the full app, you can refer to the Lago README

# Ubuntu
sudo apt install rbenv

# macOS
brew install rbenv
brew install libpq

rbenv init
# close and re-open your terminal
curl -fsSL https://github.com/rbenv/rbenv-installer/raw/main/bin/rbenv-doctor | bash
rbenv install 3.0.1
rbenv global 3.0.1
  • Install project dependencies
gem install bundler
bundle install
  • Create a file named config/master.key, get the value for it into 1Password
touch ./config/master.key
  • Copy the .env.dist to .env
cp .env.dist .env
  • Install Rubocop locally (required for all developers)
gem install rubocop rubocop-rspec rubocop-performance rubocop-rails rubocop-thread_safety
  • Start the database by running docker-compose up db
  • Prepare the database and run migrations
rake db:setup
rake db:migrate
  • Launch the server
rails s

GraphQL

Generate GraphQL Schema

  • You need to regenerate the schema each time you change something about GraphQL, if you don't, it will make your specs fail.
$ rake graphql:schema:dump
Clone this wiki locally