generated from shadab14meb346/serverless-graphql-starter-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
84 lines (79 loc) · 2.1 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
service: serverless-graphql-rds
frameworkVersion: "3.8.0"
provider:
name: aws
runtime: nodejs14.x
stage: ${env:PROVIDER_STAGE}
region: ${env:REGION}
environment:
JWT_SECRET: ${env:JWT_SECRET}
DATABASE_URL: ${env:DATABASE_URL}
REDIRECT_TO_DASHBOARD: ${env:REDIRECT_TO_DASHBOARD}
HUB_SPOT_CLIENT_ID: ${env:HUB_SPOT_CLIENT_ID}
HUB_SPOT_CLIENT_SECRET: ${env:HUB_SPOT_CLIENT_SECRET}
HUB_SPOT_REDIRECT_URI: ${env:HUB_SPOT_REDIRECT_URI}
GA_CLIENT_ID: ${env:GA_CLIENT_ID}
GA_CLIENT_SECRET: ${env:GA_CLIENT_SECRET}
GA_REDIRECT_URI: ${env:GA_REDIRECT_URI}
MS_CLIENT_ID: ${env:MS_CLIENT_ID}
MS_CLIENT_SECRET: ${env:MS_CLIENT_SECRET}
MS_REDIRECT_URI: ${env:MS_REDIRECT_URI}
plugins:
- serverless-plugin-typescript
- serverless-offline
package:
patterns:
- "migrations/**"
- "**.js"
- "config"
custom:
serverless-offline:
httpPort: ${env:httpPort, 3000}
lambdaPort: ${env:lambdaPort, 3002}
serverless-plugin-typescript:
tsConfigFileLocation: "./tsconfig.json"
functions:
graphql:
handler: server.handler
events:
- http:
path: graphql
method: post
cors: true
playground:
handler: server.playgroundHandler
events:
- http:
path: playground
method: get
cors: true
oauth-callback:
handler: ./rest-apis-handlers/oauth-callback.handler
events:
- http:
path: oauth-callback
method: get
cors: true
ga-oauthcallback:
handler: ./rest-apis-handlers/ga-oauthcallback.handler
events:
- http:
path: ga-oauthcallback
method: get
cors: true
ms-oauthcallback:
handler: ./rest-apis-handlers/ms-oauthcallback.handler
events:
- http:
path: ms-oauthcallback
method: get
cors: true
cron-job-each-minute:
handler: ./cronjobs/handler.eachMinute
events:
- schedule: rate(1 minute)
cron-job-each-30-minute:
handler: ./cronjobs/handler.each30Minute
events:
- schedule: rate(30 minutes)
# add all of the possible interval cron jobs here