-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserverless.yml
More file actions
43 lines (38 loc) · 1.11 KB
/
serverless.yml
File metadata and controls
43 lines (38 loc) · 1.11 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
# -----------------------------------------------
# serverless.yml — AWS Lambda + API Gateway Config
# -----------------------------------------------
# Deploys the Express backend as a single Lambda function
# behind API Gateway (HTTP API — free tier friendly).
# -----------------------------------------------
service: tech-community-hub # keep this name to match existing AWS deployment
frameworkVersion: '3'
useDotenv: true
provider:
name: aws
runtime: nodejs20.x
region: ap-south-1 # Mumbai (closest to you — change if needed)
stage: ${opt:stage, 'dev'}
memorySize: 512
timeout: 30 # seconds (Gemini calls may take a few seconds)
environment:
MONGO_URI: ${env:MONGO_URI}
JWT_SECRET: ${env:JWT_SECRET}
GEMINI_API_KEY: ${env:GEMINI_API_KEY}
functions:
api:
handler: server.handler
events:
- httpApi:
path: /{proxy+}
method: ANY
- httpApi:
path: /
method: ANY
package:
excludeDevDependencies: true
patterns:
- "!client/**"
- "!mobile/**"
- "!node_modules/.cache/**"
- "!.git/**"
- "!*.md"