How to host nodeJS project for firebase?

I am using node, expression and other other dependencies for a project. I wonder how to host this project on firebase. My project will have a controller, view and any other folders to make the project possible. It already has a browsing mechanism like pug / handlebars.

Online tutorials show you how to host firebase with only index.html in a shared folder. How can I place my project with all other folders? I know how to use firebase in nodeJS, but how do I host the project on firebase? How will firebase access the server file (or app / index.js)? Where should I put all these folders?

I hope I am not asking for much. If my question is not clear please let me know so I can clarify.

+14


source to share


2 answers


Lucky you. Firebase just released a video this week



+34


source


You can do it with Firebase cloud feature. Deployment authentication is handled by the Firebase CLI, so starting and running Hello World is literally:

firebase init functions
firebase deploy

      

Simple Hello World Function



functions.https.onRequest((request, response) => {
    response.send("Hello from Firebase!");
});

      

Note: You can use express with Firebase feature.

For more information, see the documentation link: https://firebase.google.com/docs/functions.

-1


source







All Articles