Hi @coelmay,
You have set the functions directory in the
netlify.toml
tofunctions
, but theapi.js
function is insrc
.
Did you recognize that there a 2 branches in the repo? You refer to the “Express-branch” - this simple Express-server works fine. toml-file isn’t needed.
The “function” branch is the one which serves the corrupted file.
You have set
included_files
to["**.xlsX"]
(note the uppercaseX
) though the filename isxlsx
(all lowercase)
OK, you are right, but it has no consequence. As written above - the express-server works fine.
included_files
need to site under the[functions]
section of thenetlify.toml
e.g.
[functions]
directory = "functions"
[functions.api]
included_files = ["src/*.xlsx"]
Look “functions”-branch
npm start
won’t work with Netlify. You cannot have a listener, but it is possible to use express as outlined in How to run Express.js apps with Netlify Functions (you need to export a handler.)
npm start is just a script. In each branch it runs different commands. See each package.json. In “function”-branch there is a exported handler.