DEV Community

Discussion on: Beginner's Guide for Creating a Serverless REST API using NodeJS over Google Cloud Functions

Collapse
 
lcarbonaro profile image
Les Carbonaro

Thank you Levi for this tutorial. It was very clear and easy to follow for the most part. I had an error come up from firebase deploy regarding firebase-function-helper but I see that you have since removed that import line.

In my case, I did not use Typescript or TSLint, so I had to remove the predeploy steps in firebase.json. Also the imports in index.js had to be require in my case.

The only thing I added was cors, so as to be able to call the endpoints from a front-end on a different domain, like now or Netlify, for example.

Also, other (older) tutorials I followed had mentioned downloading service account settings as a json file and then importing that in the project. A bit of a hassle. Your solution is much cleaner in this regard and, as a result, more portable.

Thank you again for a very helpful article.

Collapse
 
levivm profile image
Levi Velázquez

I'm glad it was useful to you.

Yep, I need to add cors so you can use the endpoints from another domain.

Thanks for the feedback.