Cloud Function in Typescript
See original GitHub issueThe functions framework expect a index.js in the local directory. I’m writing my functions in Typescript and test it locally with nodemon, ts-node and a ts file, which starts the express server.
Is there a better way than running tsc
every time something changes and then start the functions-framework?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:7
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Cloud Functions with TypeScript - Duffblog
Here's a small sample that uses TypeScript + Cloud Functions I have a complicated relationship with JavaScript. I'm old enough to remember ...
Read more >Firebase Cloud Functions with Typescript and Webpack
Recently Firebase launched Cloud Functions–a way to run your code on their servers. It's a game changer! Now you can run code that...
Read more >Building a REST API with Firebase cloud functions, TypeScript ...
In this article, you can learn how to build a REST API with Firebase cloud functions, TypeScript, and Firestore.
Read more >How to define a Google Cloud Function with Typescript?
I am trying to setup a NodeJS function using Google Cloud Function (GCF) in typescript. I am trying to be strict with my...
Read more >flatfisher/cloud-functions-typescript-template - GitHub
cloud-functions-typescript-template is a base project of Google Cloud Functions using TypeScript. This project contains tools and configuration files that ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
My solution right now is to use tsc-watch and the following command:
In the local directory I created
index.js
, which loads the transpiled js:And that’s the
tsconfig.json
This is how I’m achieving it using
nodemon
:It’s a bit verbose I have to say, but it’s also following the official TS node boilerplate.