How to add a simple serverless function? #3309
Unanswered
brettdewoody
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Most likely you would want a Netlify function, and would use netlify dev to test your site (and it works just fine running Eleventy as well). Eleventy Serverless is more for cases where you need to run something on the server and make use of Eleventy layout and such. I'm probably grossly over simplifying that and it's been a while since I used it, but again, you probably just want the Netlify function. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'd like to add a simple serverless function on an Eleventy site running on Netlify. As an example, I want to create a function to create a Stripe checkout session.
Is the
EleventyServerlessBundlerPlugin
necessary for this?Or can I create a function in
/netlify/functions/
and have this deployed as a Netlify function?And for local development, would this work with
npx eleventy
, or would it require runningnetlify dev
?Beta Was this translation helpful? Give feedback.
All reactions