Deploying golang project. It's not work

I make service listening 8080 port and when build and deploy shows ok - all pages returns 404 Page not found.
When I run command netlify dev --context production on local machine it works good. It see target port 8080 and works on port 3000.
But when I deployed on netlify server, I see only “page not found”.
Maybe production doesn’t see 8080 port or can’t run ./main of builded file main.go?
My site -

Hi there,

Please check out this guide.

If you are still seeing issues after following the troubleshooting steps in there, please check out this Support Guide as well. It outlines all of our build and deploy resources and will get you on the right track :slight_smile:

If none of the above resources help, please write back with your about what steps you have tried and we can look into this further!

It’s not solution for me, because I don’t use /index.html or any html files.
There is another way for golang services. My steps:

  1. Configure build command: go build cmd/invest/main.go (it will make file main in base directory)
  2. Make config file netlify.toml with env
  3. Deploy (must run ./main)

You’ll need to.

There is no option to run anything. Netlify is designed for static sites. You can do server-side rendering, but I don’t think that’s what you’re trying to do either.

Read through

Dou you mean, that this post is lie?

Considering I’ve never seen that post before, I cannot provide opinion on the validity of it.

The linked git repository in the article mentions nothing of this. There is a which is used as the build command, and the contents of it look very different to your command. The aim of this is to facilitate Netlify building the serverless functions that then render the site and serve content (which is HTML.)

And I can tell you if you clone the repository and deploy it, it does work. I can tell you this because I just did it. So if you follow the way the demonstration repository is set up, you should have no issues deploying your own.