E-commerce app. Shop online with Shopline. You shop, we ship!
Prerequisites
Create .env
file at the root of the project directory. Copy the content of .env.template.erb
to .env
then update the username
and password
based on your database credentials. Get STRIPE_SECRET_KEY
and STRIPE_WEBHOOK_SECRET
from your Stripe account
Install dependencies and setup database
bin/setup
Start local web server
bin/dev
Go to http://localhost:3000
Use Stripe CLI to simulate Stripe events in your local environment or learn more about Webhooks
stripe listen --forward-to localhost:3000/stripe_webhooks
Setup test database
bin/rails db:test:prepare
Default: Run all spec files (i.e., those matching spec/**/*_spec.rb)
bin/rspec
Run all spec files in a single directory (recursively)
bin/rspec spec/models
Run a single spec file
bin/rspec spec/models/product_spec.rb
Run a single example from a spec file (by line number)
bin/rspec spec/models/product_spec.rb:8
See all options for running specs
bin/rspec --help