-
Notifications
You must be signed in to change notification settings - Fork 23
/
serverless.yml
33 lines (28 loc) · 905 Bytes
/
serverless.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Welcome to serverless. Read the docs
# https://serverless.com/framework/docs/
# Serverless.yml is the configuration the CLI
# uses to deploy your code to your provider of choice
# The `service` block is the name of the service
service: serverless-stripe-backend
# Configuration variables
custom:
secrets: ${file(secrets.json)}
# The `provider` block defines where your service will be deployed
provider:
name: aws
runtime: nodejs6.10
stage: dev
# profile: personal
# region: ap-southeast-1
environment:
STRIPE_SECRET_KEY: ${self:custom.secrets.stripeSecretKey} # Stripe secret API key
# The `functions` block defines what code to deploy
functions:
createCharge:
handler: functions/createCharge.handler
# The `events` block defines how to trigger the handler.createCharge code
events:
- http:
path: charges
method: post
cors: true