Firebase hosting and NodeJS

Thanks for this guide, I followed all the steps but on my root domain i’m presented with this message from firebase (after saving, deploying & clearing cache):

This is my firebase.json file:

And my routing:

The hosting page on Firebase developer console is showing the files did get uploaded:

1 Like

Have you checked the firebase hosting tutorial?

Yes I did check the documentation thoroughly. Does my firebase.json look correct?

I think im experiencing the same issues as @Marzio here: Node.js index.js start?

I want to develop my application but this is holding me back. I think there is some problem with your editor routing for node.js on new projects

There are no any known issues with the routing. Most probably there are issues with your target/hosting/project setup.

I have it working with my own specified localhost target and I’m seeing these errors:

App listening at http://localhost:3000
events.js:292
      throw er; // Unhandled 'error' event
      ^

Error: listen EADDRINUSE: address already in use :::3000
    at Server.setupListenHandle [as _listen2] (net.js:1313:16)
    at listenInCluster (net.js:1361:12)
    at Server.listen (net.js:1447:7)
    at Object.start (/Users/X/Desktop/project/lib/server.js:61:16)
    at Object.<anonymous> (/Users/X/Desktop/project/index.js:3:8)
    at Module._compile (internal/modules/cjs/loader.js:1138:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
    at Module.load (internal/modules/cjs/loader.js:986:32)
    at Function.Module._load (internal/modules/cjs/loader.js:879:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
Emitted 'error' event on Server instance at:
    at emitErrorNT (net.js:1340:8)
    at processTicksAndRejections (internal/process/task_queues.js:84:21) {
  code: 'EADDRINUSE',
  errno: 'EADDRINUSE',
  syscall: 'listen',
  address: '::',
  port: 3000
}

[nodemon] app crashed - waiting for file changes before starting…

When I try to use the default local target it gives me this error:
image


I have followed your instructions explicitly, I don’t know what more I can do, is there anything you need to see from me to help diagnose this problem?

Please note that Firebase Hosting does not support NodeJS! Or any other server model.

It supports only static HTML files hosting.

If you want NodeJS support choose Heroku or any other hosting provider that supports it.

Or run a VPS with docker like the droplets from digital ocean. Those are easy to setup straight from Wappler.

2 Likes

Oh lol thanks for telling me :slight_smile:
I will try Heroku, I would like to use digital ocean but my mac can only run docker toolbox from the terminal not a gui desktop app : (

There is no connector for S3 storage right now in Wappler. It is going to get some attention during the next weeks, but as Heroku doesn’t have persistent storage I thought it would be worth mentioning.

You can custom code that but I think that is not something you would probably be interested in doing. So you will have to wait a bit until that is implemented by the team.

Just put on hold any asset storing functionality if your app has one and focus on other parts.

1 Like

Also what do you mean with this. Mac handles Docker quite well. You shouldn’t have any issues with it in MacOS. I use it constantly.

1 Like

I’m using an imac from 2009 :slight_smile:
my macbook air ssd died recently, apple cost too much to fix and I cant afford it right now. I like the os more than windows but I dont like how difficult they are to repair, especially the newer laptops. I’m hoping to build a hackintosh in the future.

Oh ok. That explains it :slight_smile:

Also agree with everything you said about repairability and cost. It is one of the biggest cons of Apple computers.

I am looking forward for the next ARM macbook pro. I believe hackintosh machines are going to have a hard time with ARM in the future. Nonetheless the transition will take quite some years and after that they will still support intel for a few years so it’s now or never for a brand new hackintosh.

1 Like

Will you integrate easy aws deployment in the future? I think that’s my best option & if I were to change from heroku would it be seamless transition?