Problem with connecting to node express, 404 and Error fetching data from the server

hi,

i cant get my react app with a node express server to work.

my requests returns 404. in the section called “FPL marathon” on the site.

i have a server folder in my root that contains the node express app. i have my routes in the index.js file.

an example of a enpoint is : /api/fpl/standings/

i am using axios not serverless if that could be an issue?

my netlify.toml file looks like this:


netlify site: https://familyfpl.netlify.app

[build]
  command = "npm run build" # Adjust this to match your build script
  publish = "dist"

[[redirects]]
  force = true
  from = "/api/*"
  status = 200
  to = "/.netlify/functions/server/:splat"

[functions]
  external_node_modules = ["express"]
  node_bundler = "esbuild"

You’re not deploying any functions:

Since you’re deploying manually, I’m not sure if you’re deploying via API or CLI or drag-n-drop. Try deploying via Git and it should work.

Do i understand you correctly that you think it will work by deploying via Github?

yes right now i have been deploying manually via CLI

npm run build - netlify deploy

thanks!

If you’re deploying via CLI, you should instead use the command:

netlify deploy --build