I’m splitting a project into a 1) lambda functions server; 2) web client that calls those functions.
I can successfully run server and client using
netlify dev from my localhost (port 8881 for the server, 8888 for the client). They talk to each other and everything is hunky-dory.
Not so when I try to
netlify build the server, though, it fails. I’m not even sure why it works with
netlify dev TBH. The command I’m using for the dev build is:
BROWSER=none; -p 8881
netlify build is configured by .toml file, which I currently have as:
[build] command = "build" publish = "build" build = "esbuild" [functions] directory = "netlify/functions" node_bundler = "esbuild" external_node_modules = ["express", "import-fresh"]
But there is no ‘build’ command, so I get a 127 error. Note that It originally was `react-scripts build’ (and still lis for the client), but I’m not serving a page, just lambda functions (react-scripts might still work if I add an index.html to the project, but that seems like a hack).
Back to the original question: I wan’t to deploy (only) lambda functions from a server, but I don’t know what the configuration should be for build/deploy. Can you help me?