I am creating my own express app and handing it over to firebase-functions as demonstrated in
this functions sample:
const expressApp = express();
app.use(cors({ origin: true }));
// app.use(bodyParser.urlencoded({ extended: true }));
// app.use(bodyParser.json());
app.use(validateFirebaseIdToken);
expressApp.get('/books', getBooks);
expressApp.post('/books', createBook);
export const app = functions.https.onRequest(expressApp);
Usually in my express apps I use the bodyParser middleware to decode JSON bodies. Surprisingly, the app is working without this middleware (note the commented lines above). Also the functions samples don't include it. I am curious how firebase-functions manages to work without this middleware?
Thanks in advance.