Tweaks
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
"@types/nodemailer": "^6.4.2",
|
||||
"concurrently": "^6.0.0",
|
||||
"nodemon": "^2.0.7",
|
||||
"serverless-dotenv-plugin": "^3.10.0"
|
||||
"serverless-dotenv-plugin": "^3.10.0",
|
||||
"serverless-plugin-git-variables": "^5.1.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,6 +16,10 @@ export const handler = createGraphQLHandler({
|
||||
sdls,
|
||||
services,
|
||||
plugins: [createSentryApolloPlugin()],
|
||||
cors: {
|
||||
origin: '*',
|
||||
credentials: true,
|
||||
},
|
||||
|
||||
onException: () => {
|
||||
// Disconnect from your database with an unhandled exception.
|
||||
|
||||
@@ -8,6 +8,7 @@ service: cadhubapi
|
||||
plugins:
|
||||
- serverless-dotenv-plugin
|
||||
- serverless-binary-cors
|
||||
- serverless-plugin-git-variables
|
||||
|
||||
custom:
|
||||
dotenv:
|
||||
@@ -65,14 +66,18 @@ functions:
|
||||
environment:
|
||||
SENTRY_DSN: ${env:SENTRY_DSN}
|
||||
DATABASE_URL: ${env:DATABASE_URL_PROD}
|
||||
COMMIT_REF: ${git:sha1}
|
||||
CONTEXT: TODO
|
||||
handler: check-user-name.handler
|
||||
events:
|
||||
- httpApi:
|
||||
path: /.netlify/functions/check-user-name
|
||||
method: GET
|
||||
# cors: true
|
||||
- httpApi:
|
||||
path: /.netlify/functions/check-user-name
|
||||
method: POST
|
||||
# cors: true
|
||||
graphql:
|
||||
description: graphql function deployed on AWS Lambda
|
||||
package:
|
||||
@@ -88,15 +93,38 @@ functions:
|
||||
EMAIL_PASSWORD: ${env:EMAIL_PASSWORD}
|
||||
SENTRY_DSN: ${env:SENTRY_DSN}
|
||||
DATABASE_URL: ${env:DATABASE_URL_PROD}
|
||||
COMMIT_REF: ${git:sha1}
|
||||
CONTEXT: TODO
|
||||
# YOUR_FIRST_ENV_VARIABLE: ${env:YOUR_FIRST_ENV_VARIABLE}
|
||||
handler: graphql.handler
|
||||
events:
|
||||
- httpApi:
|
||||
path: /.netlify/functions/graphql
|
||||
method: GET
|
||||
# cors: true
|
||||
- httpApi:
|
||||
path: /.netlify/functions/graphql
|
||||
method: POST
|
||||
# cors: true
|
||||
# identity-signup: # this is netlify specific and is related to go true auth, so we'll continue having that deployed on netlify
|
||||
# description: identity-signup function deployed on AWS Lambda
|
||||
# package:
|
||||
# artifact: api/dist/zipball/identity-signup.zip # This is the default location of the zip file generated during the deploy command.
|
||||
# memorySize: 1024 # mb
|
||||
# timeout: 25 # seconds (max: 29)
|
||||
# tags: # Tags for this specific lambda function
|
||||
# endpoint: /.netlify/functions/identity-signup
|
||||
# # Uncomment this section to add environment variables either from the Serverless dotenv plugin or using Serverless params
|
||||
# # environment:
|
||||
# # YOUR_FIRST_ENV_VARIABLE: ${env:YOUR_FIRST_ENV_VARIABLE}
|
||||
# handler: identity-signup.handler
|
||||
# events:
|
||||
# - httpApi:
|
||||
# path: /.netlify/functions/identity-signup
|
||||
# method: GET
|
||||
# - httpApi:
|
||||
# path: /.netlify/functions/identity-signup
|
||||
# method: POST
|
||||
openscadpreview:
|
||||
image:
|
||||
name: openscadimage
|
||||
@@ -136,25 +164,6 @@ functions:
|
||||
method: post
|
||||
cors: true
|
||||
timeout: 30
|
||||
# identity-signup.ts: # this is netlify specific and is related to go true auth, so we'll continue having that deployed on netlify
|
||||
# description: identity-signup.ts function deployed on AWS Lambda
|
||||
# package:
|
||||
# artifact: api/dist/zipball/identity-signup.ts.zip # This is the default location of the zip file generated during the deploy command.
|
||||
# memorySize: 1024 # mb
|
||||
# timeout: 25 # seconds (max: 29)
|
||||
# tags: # Tags for this specific lambda function
|
||||
# endpoint: /.netlify/functions/identity-signup.ts
|
||||
# # Uncomment this section to add environment variables either from the Serverless dotenv plugin or using Serverless params
|
||||
# # environment:
|
||||
# # YOUR_FIRST_ENV_VARIABLE: ${env:YOUR_FIRST_ENV_VARIABLE}
|
||||
# handler: identity-signup.ts.handler
|
||||
# events:
|
||||
# - httpApi:
|
||||
# path: /.netlify/functions/identity-signup.ts
|
||||
# method: GET
|
||||
# - httpApi:
|
||||
# path: /.netlify/functions/identity-signup.ts
|
||||
# method: POST
|
||||
|
||||
# this allows browsers to see error responses.
|
||||
resources:
|
||||
|
||||
@@ -17132,6 +17132,11 @@ serverless-dotenv-plugin@^3.10.0:
|
||||
dotenv "^10.0.0"
|
||||
dotenv-expand "^5.1.0"
|
||||
|
||||
serverless-plugin-git-variables@^5.1.0:
|
||||
version "5.1.0"
|
||||
resolved "https://registry.yarnpkg.com/serverless-plugin-git-variables/-/serverless-plugin-git-variables-5.1.0.tgz#668aceed366d647ac0143c4a8bc4782b7536df12"
|
||||
integrity sha512-72HcfC6KIpsiPimJrdAknvtYEfERgm1+f6TPj3mvA5Dd+2xDFoi6bItyRwqqepoCshL77AFfzpmlxYn58Ez0rw==
|
||||
|
||||
set-blocking@^2.0.0, set-blocking@~2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7"
|
||||
|
||||
Reference in New Issue
Block a user