How to convert this node file to a netlify function?

hi all, new to netlify functions and lambda. I wanted to get this converted to a netlify function:

I’ve set up the toml file and installed the lambda package and my repo is connected to netlify. I’ve tried to read the netlify function docs but I’m out of my depth, new to node and api’s. Just trying to make a tshirt store.

any help would be appreciated, thanks.

hey steph, welcome!

Cool that you are checking out functions - they are super versatile and very useful. I’m hoping someone from the wider community will weigh in, because as support team staff for all of netlify worldwide, we don’t have the capacity to really dig in and help you with this - (sounds fun tho, actually, wish we did).

These are two resources I can share with you:


there may be some code in here that does parts of what you want/need for this endeavour?

Let me know if there are specific things or debugging we can help you with that are maybe a bit narrower in scope :wink:

thanks Perry! Yeah I poked around, the examples feature is really great too, I found these:

but at the end of the day I’m too novice to understand lambda (I don’t have a grip on API’s and all that) so just going with heroku. thanks though!

1 Like

sounds good! If you find resources that might be useful to other folks in your spot, we’d love it if you shared 'em here too. good luck with your project :muscle: