How to locally run functions without using netlify dev

Hi there!

I am currently developing a site, with a netlify functions backend serving an apollo graphql server. My team is 4 people, 2 full stack developers and 2 frontend developers.

After I finished a stable version of the graphql server, one of the frontend developers was to start working on the frontend only part of the site, using the data produced by the graphql server/netlify function. When the developer could not access the data from graphql, I realized he was using npm run. I was running netlify dev. He does not have a seat in netlify, since he is not to be involved in the deployment or testing of the site.

Is there any way our team members not involved in the development of functions can locally run the code, without having to get netlify-cli? I read the documentation for netlify dev, and googled around, and I can’t find any suggestion. Can you give me any recommendation about how to proceed?

Thank you,

ZSC

Hi @ZSC, testing netlify functions without netlify dev would still require at least netlify-lambda and a small server.js file. You’ll need to do two things:

Example repository: https://github.com/depadiernos/token-hider-inator

One caveat to this is that netlify-lambda does not support zipped functions, only bundled ones, but this does not require a netlify account to run.

Thank you, @Dennis! We’ll do some testing here and be back to report when it works.

ZSC

1 Like