A template for writing Google Cloud Function with Node.js, TypeScript, Babel, ESLint, and Prettier.
npm install
npm start
Simply deploy the function from your local machine with the gcloud
command-line tool by running:
REGION=[SET_GCLOUD_REGION] FUNCTION_NAME=[NAME_YOUR_FUNCTION_ON_GCLOUD] npm run deploy-gcloud
npm run build-zip
You will need to install Docker and the pack
tool, then run:
npm run build-container
After that, you'll be able to start the built container with:
docker run --rm -p 8080:8080 my-function