-
Notifications
You must be signed in to change notification settings - Fork 1
/
serverless.yml
43 lines (38 loc) · 968 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
34
35
36
37
38
39
40
41
42
# NOTE: update this with your service name
service: backend
# Use the serverless-webpack plugin to transpile ES6
plugins:
- serverless-webpack
- serverless-offline
# serverless-webpack configuration
# Enable auto-packing of external modules
custom:
webpack:
webpackConfig: ./webpack.config.js
includeModules: true
provider:
name: aws
runtime: nodejs8.10
stage: dev
region: us-east-1
# To load environment variables externally
# rename env.example to env.yml and uncomment
# the following line. Also, make sure to not
# commit your env.yml.
#
environment: ${file(env.yml):${self:provider.stage}}
functions:
balance:
handler: api/wallet.balance
events:
- http:
path: balance/{cointype}
method: get
cors: true
sendcoin:
handler: api/wallet.sendCoin
events:
- http:
path: sendcoin/{cointype}/{walletaddress}/{amount}
method: post
cors: true