Hello and thank you
I want to set up a small backend for nodemailer with express and node js
Here https://stage-thomas-diagram.netlify.app
So far so good, the functions are loaded but I don’t understand why I always get 404 errors for all requests…
Here is my code:
all my requests on stage-thomas-diagram.netlify.app/api/hello or stage-thomas-diagram.netlify.app/api/coucou are 404
Thanks you
@ThomasGwcs There’s no node.js server hosting with Netlify, see the following for clarification:
The Serverless Function documentation is here:
Hello and thank you very much for your response
I found the solution shortly after, I deleted the toml file
[functions]
external_node_modules = [“express”]
node_bundler = “esbuild”
[[redirects]]
strength = true
from = “/api/*”
status = 200
to = “/.netlify/functions/api/:splat”
and I replaced it with simply:
[build]
functions=“functions”
Requests now work on the address .netlify.app/.netlify/functions/api
I don’t know why the first toml file didn’t want to take the route into account… At least now it works