Skip to content

Instantly share code, notes, and snippets.

View nightroadcosplay's full-sized avatar

Alecu Silviu-Marian nightroadcosplay

View GitHub Profile
@androidovshchik
androidovshchik / index.ts
Last active July 13, 2021 16:00
Firebase image optimizing in typescript
import * as functions from 'firebase-functions';
import * as admin from 'firebase-admin';
import * as fs from 'fs';
import * as path from 'path';
import * as os from 'os';
import mkdirpPromise from 'mkdirp-promise';
import {spawn} from 'promisify-child-process';
import {ObjectMetadata} from "firebase-functions/lib/providers/storage";
admin.initializeApp();