GoogleCloudPlatform / GoogleCloudPlatform/functions-framework-nodejs
Deploy multiple TypeScript functions to Google Cloud
- Lingua principale
- TypeScript
- Stelle
- 1.4k
- Fork
- 181
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
How can I build and deploy multiple TS cloud functions from the same codebase?
I'm following your TS guide which focuses on the single function use case -> [docs/typescript.md](https://github.com/GoogleCloudPlatform/functions-framework-nodejs/blob/main/docs/typescript.md)
Project structure :

Deploy command :
`gcloud functions deploy catalogUpdateFunction \
--gen2 \
--region=europe-north1 \
--runtime=nodejs22 \
--source=. \
--entry-point=catalogUpdateFunction \
--trigger-http
`
Open questions:
1. What should be the value of the main field in package.json ?
2. What should the source be for the deploy command?
Setting the source value to ` --source=./build/functions \` fails with the following error: `ERROR: (gcloud.functions.deploy) Invalid value for [--source]: Provided source directory does not have file [package.json] which is required for [nodejs22]. Did you specify the right source?`
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Start with docs/typescript.md and the package.json and build/functions layout described in the issue. Verify the expected source directory and main field for deploying multiple Node.js 22 functions, then document a working multi-function deployment path that answers both questions and addresses the reported missing package.json error.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- google-cloud, nodejs, typescript
- Ambito
- cloud, documentation
- Tipo di issue
- Documentazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100