Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

103
Vistas
Webapp front-end structure using Firebase, Hosting vs Functions

I'm working on a small scale ERP using Firebase's free plan (for a single user). I started out hard-coding html and serving it with firebase hosting, a flow that proved uneffective in the long run. Soon I needed routes, authentication and a database, which led me to using a Express server running in a single firebase function for everything, so I could protect the routes and database access. This gives me the feel I'm doing something terribly wrong as firebase functions has an obnoxiously long URL and my API routes are just one directory away from my front-end routes.

I'm at a loss to how I should proceed but I believe there are the following options:

  • A - Go back to using firebase hosting for the front-end, meaning I have to protect the static files with a function that checks localStorage for a web token (jwt) and redirects to the login page upon failure.
  • B - Create a second firebase function for the front-end, meaning I get to use ejs and express, but I have to keep the really long URL and I have no idea how to change it (using a redirect from an owned domain only serves as an alias, the domain name doesn't persist).

A seems unsafe and B annoys me as I don't get a custom URL, how should I proceed and serve the project?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

By definition, your static code is public because there is no value in it. The value comes from the API calls that you perform to Functions or Database to fill in your static pages.

If your static code doesn't contain critical information, you can use firebase hosting to host it without any problem.

If not, you have to check the authentication AND the authorization (is that authenticated user has the permission to access that resource?) with dynamic code (i.e. a functions).

If default URL are too long, you can use a custom domain.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda