Cannot expose more than one port

Hi everyone, I am trying to deploy a fullstack MERN app on koyeb with the hobby plan. The problem is that I can only expose 1 port. Is this a limitation of the plan ( doesn’t seem to be as I am able to add and save the second port).

As soon as I start the deployment, if I look at the settings, it says that I only have one port exposed.

Im not sure what to do…

Hi @Emma_Craig, did you find a solution to your problem?

~ Alisdair

Hi, no I didn’t. I realised though that I do not need to expose more than one port. I was thinking I needed to expose both the front end and the back end, but realise that what I have to do is only expose the backend.

The issue is that the frontend is not building and I have no idea why not.

This is my first fullstack project and I’m just quite confused about the set up.

This is an endpoint to the back end ( running on port 5000)
https://monthly-elicia-pepper-magazine.koyeb.app/articles

Then I should see the app at https://monthly-elicia-pepper-magazine.koyeb.app/

but I get ‘error 404 not found’. In the logs there is no build, there is only loading the express server and connecting to the database

Hello,

You’re almost there. What’s missing is that you need to serve your frontend with a fallback request handler from your express app. Try adding this after all your backend routes:

app.use(express.static('public'))

Hope it helps!

1 Like

amazing! thank you so much.

1 Like