- Ruby 2.4
- Rails 5
- Nginx / Puma
- PostgreSQL
Using docker is probably the easiest way to setup your local API if you want to work on mostly front-end part. Docker should be already installed to follow this process. More info about docker setup is on here.
Run following commands to build docker:
docker-compose build
docker-compose upThen a server is up on http://localhost:3001
If you made changes in bin/start.sh for DB reset, etc, run following commands again:
docker-compose build && docker-compose upIf you want to build a local API environment manually on your machine,
First install rbenv and ruby
brew install rbenv
brew install ruby-build
rbenv install 2.4.2If you don't have PostgresSQL or Node installed on your machine, install it via
brew install postgresql nodeThen prepare your dev database:
PG_UNAME=steemhunt
psql -d postgres -c "CREATE USER $PG_UNAME;"
psql -d postgres -c "ALTER USER $PG_UNAME CREATEDB;"
psql -d postgres -c "ALTER USER $PG_UNAME WITH SUPERUSER;"Then clone the api repo on
your_path/steemhunt/api
and web repo on
your_path/steemhunt/web
On api repo, install gems
gem install bundler
bundle installthen migrate database
bundle exec rails db:drop db:create db:migrate db:seedNow you finished installation.
You can start both api and web server by running
bundle exec rails start