-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathserverless.yml
More file actions
52 lines (50 loc) · 1.03 KB
/
serverless.yml
File metadata and controls
52 lines (50 loc) · 1.03 KB
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
service: prisma-aws-lambda-example
plugins:
- serverless-offline
- serverless-dotenv-plugin
- serverless-webpack
- serverless-webpack-prisma
custom:
webpack:
webpackConfig: 'webpack.config.js'
includeModules: true # This is required
packagerOptions:
scripts: # this is the magic
- prisma generate
serverless-offline:
useChildProcesses: true
provider:
name: aws
region: us-east-1
runtime: nodejs12.x
functions:
status:
handler: handlers/status.handler
events:
- http:
method: GET
path: /
seed:
handler: handlers/seed.handler
events:
- http:
method: GET
path: /seed
getUsers:
handler: handlers/users.handler
events:
- http:
method: GET
path: /users
createUser:
handler: handlers/create-user.handler
events:
- http:
method: POST
path: /users
getPosts:
handler: handlers/posts.handler
events:
- http:
method: GET
path: /posts