After watching Node.js apps on Firebase Hosting I tried to create a project with Polymer and NodeJs/express and firebase hosting.
In the linked Video it is shown that firebase would serve by default the static public/index.html file which is why they remove it to then serve a dynamic one. However, this particular file is in the same functions directory and not anymore placed in the public folder.
Does this mean that my whole project should be placed in the functions folder or just the app entry-point? I am not able to send a file that is placed in my public folder as shown below.
- project
- functions
- server.js
- public
- index.html
- functions
app.get('*', (req, res) => {
res.sendFile(path.join(__dirname, '/public/index.html'));
})
I believe firebase is hosting the public and the function folder differently or am I referencing just wrong?