*) I want to split the code to handle the various pieces into individual functions but don’t want to register them on different paths. This seems like 101 but my googling hasn’t helped me find a way to register them to same path and then handle sub paths and route based on the sub path. This is easily done via express in non-serverless world. There are some libraries which allow me to do this https://github.com/modofunjs/modofun but it’s all too primitive for real world use cases (I can provide details). What is the recommended best practice from Google serverless team?
*) I don’t want to be defining these URLs manually. I would like to write openAPI spec for my APIs and realize them in cloud endpoints and then use google cloud functions to just handle the HTTP calls. It doesn’t seem like cloud endpoints and google cloud functions are actually integrated. Is this integration planned?
*) Apparently, I am not the first one to spot these but someone blogged about in detail in 2017 https://medium.com/@andyhume/building-a-rest-api-with-google-cloud-functions-e0acdf1b2620. I don’t see much change in 1.5 years. Is google cloud function actively being developed?
*) No API gateway - GCF integration (so we have to implement openAPI also as GCF functions), no HTTP route handling support (everyone implements their ghetto way) and authenticating those API requests means you write a boiler plate function that now takes the Auth header from API calls and does the validation in yet another GCF (https://stackoverflow.com/questions/48531608/authentication-in-http-google-cloud-functions). By default, API calls are unauthenticated (bad default). We anyways have to figure out API model validation, handle routing, auth, rate limiting etc ourselves. So what's the point? Just cost savings because they handle lifecycle of this code? Also, there is no middleware support.
*) There is a total of 1 typescript example in this https://github.com/firebase/functions-samples. And it's a trivial example! Not much useful
*) gcloud functions CLI and firebase CLI are not feature par. firebase deploy works well with typescript. gcloud functions assumes lib/index.js is available and does not do the transpile before.
*) Testing functions locally (especially if using firestore) is different from running them in gcp. You don't need creds for gcp function but for local testing, you do need it. The examples are poor at highlighting the difference
*) Whole node 6, node 8, typescript mess drives me insane. Plenty of examples are written for Node 6 or 8. Ideally, I want to write the code in languages like Python or Go. We are forced to write them in javascript or typescript.
Nice to haves:
*) No integration with VS Code. Azure has a plugin!