Here's a small sample that uses TypeScript + Cloud Functions I have a complicated relationship with JavaScript. I'm old enough to remember when it first appeared in Netscape Navigator back when the web was truly tiny and everything had a kind of bo...
Markdown supported · ⌘↵ to post
I'm getting deeper into the gcf world and I have been around the block trying to find a concise example of using typescript + gcf - thank you so much!
JS
Thanks for this concise readme! I wish I'd found this post sooner. Since I didn't, I setup something similar, but my setup only uploads the built JS files (via the
--sourceflag). It works well enough, but there are some oddities like I need to copy package*.json to my built folder before deploy.Question - are you having any issues with stack traces in logs? I'm finding that the traces of course link back to JS files, not TS files. Would we need to generate sourcemaps or the like to get better logs?
Btw, I'm finding this useful so thought I'd share. To get live reloading with this setup I'm using nodemon:
nodemon --watch src/*.ts --exec "npx functions-framework --target=main --source=built".