/server

RESTful backend for Meal Planner

Primary LanguageRubyGNU General Public License v3.0GPL-3.0

Meal Planner Server

Build Status Code Climate Codacy Badge Dependency Status Join the chat at https://gitter.im/meal-planner/public

Meal Planner is an open source recipe recommendation and nutrition balancing service - meal-planner.org

This repository contains RESTful backend implementation. Resources documentation - docs.meal-planner.org

Requirements

This application is developed with Sinatra framework and requires Ruby to run and Bundler to install it.

All application data is stored in ElasticSearch instance. Bonsai.io is used to host ElasticSearch clusters.

Twitter OAuth sign in requires persistent storage of request tokens, so running Redis instance is also required.

Installation

  • Install Bundler

    gem install bundler
    
  • Run Bundler

    bundle install
    

Running locally

Start Sinatra with Rack:

rackup -p4567

Deployment

This application is deployed at Heroku and requires Heroku toolbelt.

First, login and create Heroku app:

heroku login
heroku create

It will create new app on Heroku and add heroku remote to the repository.

After that deployment can be done with a simple push:

git push heroku master

Configure all required environment variables with heroku config:set VARIABLE_NAME=VALUE

See .env.dist file for the list of used environment variables.