You need to have a running mysql database to connect to.
Then, you can run the following command to install the dependencies and run the project:
bundle install
rake db:migrate
rake db:all_seed
bin/rails s
Add the following to credentials:
db_user_dev: <database_username>
- for development onlydb_password_dev: <database_password>
- for development onlysecret_key_base: <secret_key_base>
devise_jwt_secret_key: <your_jwt_secret_key>
stripe_secret_key: <your_stripe_api_key>
(GUIDE)stripe_webhook_secret: <your_stripe_webhook_secret>
(GUIDE) - for development onlystripe_webhook_production_secret: <your_stripe_webhook_secret>
(GUIDE) - for production
EDITOR="nano" bin/rails credentials:edit # eventually replace nano with your favorite editor
Run the following command to test the webhooks and copy the signature to the stripe_webhook_secret:
stripe listen --forward-to http://localhost:3000/payment/success/webhook
per i test: o si fa "rake cucumber" avendo startato la webapp, o si starta il rails test server con "RAILS_ENV=test rails s" e si starta la webapp