Sample app using Algolia with Rails
and React.js
with react-rails gem.
Try it live: search-production.herokuapp.com. Feel free to play with it, the database is reset every day.
-
Clone the repo.
git clone [email protected]:jvenezia/search.git
-
Install dependencies.
bundle install
-
Setup postgres database using your own config file.
cp config/database.yml.example config/database.yml rake db:create db:migrate
-
Setup your algolia credentials and other variables in
.env
file.ALGOLIA_INDEX_NAME
will be prepended with the current environment (eg:search_production
).PORT=3000 RAILS_ENV=development PUMA_WORKERS=1 PUMA_WORKER_THREADS=1 ALGOLIA_APPLICATION_ID=example ALGOLIA_API_KEY=example ALGOLIA_SEARCH_ONLY_API_KEY=example ALGOLIA_INDEX_NAME=search
-
Import dataset. This will also populate your Algolia index.
rake reset_database
-
Run server with foreman.
foreman start
You can run the test suit using rake
.
Bug reports and pull requests are welcome on GitHub.
- Fork it (https://github.com/jvenezia/search/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request