Small Rails API to serve up to a React Front End
https://github.com/abrahamkinney/doctor-api
https://github.com/abrahamkinney/doctor-frontend
npm insall
brew install redis
brew install node
npm install
brew install postgres
NOTE: do NOT run standard Rails db tasks like rake db:migrate
Management of the lootcrate database for all projects is handled
via ldbm, the Lootcrate database manager. For instructions see the
README in the lootcrate/ldbm repository.
Install Heroku
brew install heroku
(ensure you have been given Heroku permissions to access lootcrate fastly)
Run the following command: bash bin/copy_plans_pages.sh lootcrate-fastly local
npm install -g bower
bundle exec rake assets:precompile
brew install phantomjs
bundle exec rake db:test:prepare
Instructions: Run rake command below with desired test user. It will create all necessary data in database and recurly. It will output the email/password.
bundle exec rake create_test_users:with_one_active_subscription
bundle exec rake create_test_users:help (list of commands)
bash -c 'cd ../lootcrate-api-grape/ && bundle exec rackup'
bundle exec foreman start -f Procfile.development
createdb lootcrate_test
bundle exec spec
npm test
Use the flag --watch to run tests on based on file changes.
npm test -- --watch
Run client mocha/chai/sinon/enzyme test
npm run mochaTest
Run the full test suite (Jest/Mocha/chai/sinon/enzyme)
npm run testSuite
The JS Jasmine test suite that may be ran from the client browser using Teaspoon
http://localhost:3000/teaspoon
To run all Jasmine tests:
http://localhost:3000/teaspoon/default
Shipping currently only United States and Canada. Billing supports all countries.
Since we are using a node and ruby buildpack, we will need to set that up in our Heroku's application. The order of buildpack execution matters here: assets must be bundled and packaged by webpack before we precompile using the assets pipeline.
heroku buildpacks:clear --app <app_name>
heroku buildpacks:set heroku/nodejs --app <app_name>
heroku buildpacks:add heroku/ruby --index 2 --app <app_name>