wafrat
  • Home
  • Projects
  • About
Subscribe

firebase functions

A collection of 3 posts
firebase functions

Make Prettier work nicely with ESLint in VSC

These days I am writing Firebase Functions, and I encountered this issue where VSC will fix formatting for me, but when I try to deploy the function, ESLint complains. I had this import in my code: import { IncomingMessage } from "node:http"; VSC is set up so that Prettier will format
Mar 20, 2023 — 1 min read
firebase functions

Enabling CORS in Firebase Functions

After struggling really hard to make a simple proxy in Firebase Functions (see my post), I realized I also needed to enable CORS. CORS Documentation Let's take a look at the documentation over at MDN. Apparently, if I want to whitelist any domain, I could set the response header: Access-Control-Allow-Origin:
Mar 14, 2023 — 1 min read
firebase functions

Using fetch in Firebase Functions in TypeScript

Yesterday I needed to make some kind of proxy for my project. Basically, I needed to make an endpoint that makes a GET request to another server, and return the result. I had heard of Firebase Functions and decided to write it in that. The meat of the code should
Mar 14, 2023 — 7 min read
wafrat © 2023