-
Notifications
You must be signed in to change notification settings - Fork 2
/
serverless.yml
61 lines (57 loc) · 1.63 KB
/
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
service: YOUR_SERVERLESS_APP_NAME # https://dashboard.serverless.com
app: YOUR_SERVERLESS_APP_NAME # https://dashboard.serverless.com
tenant: YOUR_SERVERLESS_TENANT_NAME # https://dashboard.serverless.com
frameworkVersion: '>=1.32.0 <2.0.0'
provider:
name: aws
runtime: nodejs8.10
stage: prod
region: us-east-1
memorySize: 3008
timeout: 30
vpc:
environment:
DB_CONN: YOUR_MONGODB_CONNECTION_STRING # https://atlas.mongodb.com
DB_NAME: YOUR_MONGODB_DATABASE_NAME
DB_COL: YOUR_MONGODB_COLLECTION_NAME
TWILIO_SID: YOUR_TWILIO_SID
TWILIO_TOKEN: YOUR_TWILIO_TOKEN
TWILIO_NUMBER: YOUR_TWILIO_NUMBER
STREAM_KEY: YOUR_STREAM_KEY
STREAM_SECRET: YOUR_STREAM_SECRET
CHANNEL_TYPE: messaging # keep this as messaging
CHANNEL_NAME: chatty-kathy-5 # make this the same value as web
functions:
auth:
handler: handler.auth
events:
- http:
path: /auth
method: POST
cors: true
chat:
handler: handler.chat
events:
- http:
path: /chat
method: POST
cors: true
sms:
handler: handler.sms
events:
- http:
path: /sms
method: POST
cors: true
plugins:
- serverless-offline
- serverless-webpack
custom:
webpack:
packager: 'yarn'
webpackConfig: 'webpack.config.js'
includeModules:
forceInclude:
- '@babel/runtime'
serverless-offline:
port: 8000