-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml
70 lines (62 loc) · 1.24 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
service: mongoose-api
provider:
name: aws
runtime: nodejs18.x
region: ap-south-1
memorySize: 128
timeout: 30
environment:
MONGO_URI: $(env.MONGO_URI)
package:
exclude:
- node_modules/aws-sdk/**
- node_modules/.bin/**
- node_modules/**/*.md
- node_modules/**/*.test.js
- node_modules/**/docs/**
- node_modules/**/examples/**
- .git/**
- .gitignore
- __tests__/**
- README.md
- jest.config.cjs
- .github/**
- eslint.config.mjs
- tsconfig.json
- .build/**
- index.ts
- .serverless/**
functions:
api:
handler: dist/index.handler
url:
authType: NONE
cors: true
events:
- http:
path: /
method: get
cors: true # Enables CORS
- http:
path: fetchHosts
method: get
cors: true
- http:
path: fetchHosts/{state}
method: get
cors: true
- http:
path: fetchHost/{id}
method: get
cors: true
- http:
path: insert_review
method: post
cors: true
plugins:
- serverless-dotenv-plugin
- serverless-prune-plugin
custom:
prune:
automatic: true
number: 1