DEV Community

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

Collapse
 
calderaro profile image
Angel Calderaro • Edited

is there a reason to have 2 express apps? good post!

Collapse
 
levivm profile image
Levi Velázquez

It is a small trick to allow rewrite the base URL, also, one is for attaching to the function, the other one for handling the rest.

Collapse
 
kevinwong15 profile image
Little Stone

What is the advantage of having them as separate?
I believe the deployment to Firebase is still the same..

Thread Thread
 
levivm profile image
Levi Velázquez

Yes, it's the same, it's just a trick, one app handles the initial request, and the other the routing.