Skip to content

Commit

Permalink
add local test env for ecommerce app
Browse files Browse the repository at this point in the history
  • Loading branch information
vkarpov15 committed Nov 23, 2023
1 parent ad4d5ca commit e6f2c8c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
14 changes: 14 additions & 0 deletions netlify-functions-ecommerce/.env.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#Fill the Local JSON API related details only when NODE_ENV is set to 'jsonapi'
#Local JSON API URL for example: http://127.0.0.1:8181/v1/ecommerce_test where 'ecommerce_test' is the keyspace name
JSON_API_URL=http://127.0.0.1:8181/v1/ecommerce_test
#Auth URL for example: http://127.0.0.1:8081/v1/auth
JSON_API_AUTH_URL=http://127.0.0.1:8081/v1/auth
#Auth username and password
JSON_API_AUTH_USERNAME=cassandra
JSON_API_AUTH_PASSWORD=cassandra

#Fill in Stripe related details if you want to see Stripe integration.
#Otherwise the sample app will bypass Stripe.
STRIPE_SECRET_KEY=test
STRIPE_SUCCESS_URL=http://127.0.0.1:8888/order-confirmation
STRIPE_CANCEL_URL=http://127.0.0.1:8888/cart
2 changes: 2 additions & 0 deletions netlify-functions-ecommerce/test/setup.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
'use strict';

require('dotenv').config({ path: `${__dirname}/../.env.test` });

const { after } = require('mocha');
const connect = require('../connect');
const mongoose = require('../mongoose');
Expand Down

0 comments on commit e6f2c8c

Please sign in to comment.