app cloudfunctions with firebase
node = 10.10.0
yarn
cp .env-sample .env
STRIPE_TEST_SECRET_KEY=XXXXXXXXXXXXXXXXXXXXX
STRIPE_TEST_CUSTOMER_ID=xxxxxxx
STRIPE_TEST_PLAN_ID=xxxxxx
cp .runtimeconfig.json-sample .runtimeconfig.json
{
"stripe": {
"secret_key": "sk_test_xxxx"
}
}
npm test
yarn build
npm install -g firebase-tools
cp .firebaserc-sample .firebaserc
# edit .firebaserc
{
"projects": {
"default": "YOUR_PROJECT_NAME"
}
}
firebase login:ci
firebase deploy --token "$FIREBASE_TOKEN" --only functions
If you face this error, that means you didn't set ORANGESYS_API_ENDPOINT
in .env file.
errorMessage: 'Error: connect ECONNREFUSED 127.0.0.1:80' }
ref: https://stackoverflow.com/questions/56850878/axios-request-error-connect-econnrefused