-
\curl -L get.rvm.io | bash -s stable –rails
-
gem install rails
-
gem install pg
-
sudo service postgresql start
-
sudo sudo -u postgres psql
-
create role pharmeasy with createdb login password ‘your_password’;
-
/etc/postgresql/9.3/main/pg_hba.conf
-
/etc/init.d/postgresql restart
-
git clone github.com/murtuzamvista/pharmeasy.git
-
cd pharmeasy
-
bundle install
-
mkdir config/production
-
cp config/development/config.yml config/production/config.yml
-
Change database and password fields in the above config.yml
-
RAILS_ENV=production rake db:drop db:create db:migrate
-
rails s -e production
-
psql prod-database-name < pharmeasy.db
-
bundle exec yardoc
-
open public/api/index.html
-
PUT localhost:3000/movies/sync => Populate Database from a remote API
-
GET localhost:3000/movies/ => Fetch all the movies
-
GET localhost:3000/movies/The Dead Pool => Fetch details of the given movie
-
GET localhost:3000/movies/search/a => Fetch details of all the movies starting with ‘a/A’