Can't view app, only see 'Hello from Fly' message

Hello there. There’s probaby a very simple explaination for this, but although I’ve deployed my Node.js app, when I open the site I only see the ‘Hello from fly’ greeting. Why can’t I see my app? Am I doing something wrong? Let me know what kind of info I can provide you with in order to help you help me. Thank you

Hello @Stargirl3, from your description, it looks like you are visiting the Hello World Node app from our docs. If that’s not what you were trying to deploy, it’ll take some more details to figure out what’s wrong.

Thank you for the response. I don’t understand why that would happen. This is what I did:

  • Created a fly.io account

  • Installed flyctl from the root of my project

  • Configured the app to listen to other ports:

const PORT = process.env.PORT || 3001
app.listen(PORT, () => {
  console.log(`Server running on port ${PORT}`)
})
  • Launched and deployed my app

Did I make a mistake somewhere along the way?
Thank you for your help!

So, the Fly.io platform won’t greet you on its own. If your app wasn’t opening, it…just wouldn’t load. The greeting you’re seeing has to be coming from a successfully deployed app.

You haven’t said anything about what the project you’re trying to deploy is.

From your description so far, it looks as though you’ve followed the tutorial at Run a Node App · Fly Docs and successfully deployed the “Hellonode” demo app, which just gives you a page with a greeting (“Hello From Node on Fly!”) when you visit the app.

If you’ve deployed the demo app before, but later deployed a different project, is it possible you’ve run fly open from the wrong directory? Flyctl gets the app name from fly.toml if there’s one present in the working directory.

You can run fly open -a <app-name> to be sure of which app you’re visiting (or, type <app-name>.fly.dev in the browser).

I am making a Node app as part of a course and I never followed the tutorial Run a Node App where it asks to clone the repository. I found this on fly docs: Visit Your App on Fly · Fly Docs which is exactly the message I was describing.

But, I deleted my fly app and re-launched it, and now it works! Not sure why, but it does. Thank you for your help anyway!

1 Like

Oh I forgot to methion that I changed the port
const PORT = process.env.PORT || 3001
to this

const PORT = process.env.PORT || 8080