Skip to content

Instantly share code, notes, and snippets.

@DarlonHenrique
Created February 22, 2024 20:17
Show Gist options
  • Save DarlonHenrique/b73608f8c1815a33ad50b7ef21d4f9c9 to your computer and use it in GitHub Desktop.
Save DarlonHenrique/b73608f8c1815a33ad50b7ef21d4f9c9 to your computer and use it in GitHub Desktop.
serverless cofnig
# yaml-language-server: $schema=https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/reference.json
service: backend
plugins:
- serverless-dotenv-plugin
- serverless-offline
- serverless-webpack
provider:
name: aws
runtime: nodejs20.x
region: sa-east-1
timeout: 30
custom:
webpack:
webpackConfig: webpack.config.js
keepOutputDirectory: true
includeModules: true
packager: npm
packagerOptions:
scripts:
- prisma generate --schema=../service/prisma/schema.prisma
functions:
main:
handler: dist/main.handler
events:
- http:
method: ANY
path: /
- http:
method: ANY
path: '{proxy+}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment