Node-1st-gen/template-handlebars/README.md
This samples shows how to serve server-side generated HTML pages using the HandlebarsJs templating system.
It also shows how to serve user specific content by passing the Firebase ID token of the signed-in user in a __session cookie.
Checking and decoding the ID token passed in the __session cookie is done with an ExpressJs middleware.
Some custom scripts in [functions/views/layouts/main.handlebars] maintain the Firebase ID token in the __session cookie.
template-handlebars directory.npm install -g firebase-tools and then configure it with firebase login.firebase use --add and select your project in the list.cd functions; npm install; cd -This sample comes with a web-based UI for testing the function. To test locally do:
firebase serve --only hosting,functionshttps://localhost:5000.To deploy and test the app on prod do:
firebase deployfirebase open hosting:site, this will open a browser.We'd love that you contribute to the project. Before doing so please read our Contributor guide.
© Google, 2017. Licensed under an Apache-2 license.