DEV Community

Ania Kubow
Ania Kubow

Posted on

Create your first Netlify Serverless Function (video)

Server-less functions are essentially server-side functions that are hosted on a third-party service. They are great as they essentially mean we can run them on someone else's server! All with the benefit of writing them in our own projects where the frontend code lives.

Netlify lets you deploy serverless Lambda functions without an AWS account, and with function management handled directly within Netlify. Your serverless functions are version-controlled, built, and deployed along with the rest of your Netlify site, and we will automatically handle service discovery through our built-in API gateway. This eliminates overhead and brings the power of Deploy Previews and rollbacks to your serverless functions.

We are going to build our first Netlify Serverless Function with 3 easy steps:

Step 1: Installing the Netlify command line interface
Step 2: File setup: so creating a directory to store your functions and writing a configuration file
Step 3: Learning the syntax

If you would like to use Netlify Functions in a real working example, please visit my Tik Tok Clone Video, in which we use them along with DataStax.

Other links:
If you would like to buy me a coffee, well thank you very much that is mega kind! : https://www.buymeacoffee.com/aniakubow

In this video I use TabNine as my A.I autocompletion tool. You can download it for free here: http://bit.ly/tabnine-free

Sign up for weekly coding tips from my newsletter partnership: https://bit.ly/JS-tips

You can also find me on:
Twitter: https://twitter.com/ania_kubow
Instagram: https://www.instagram.com/aniakubow

Top comments (1)

Collapse
 
ogbotemi2000 profile image
ogbotemi-2000

Hello Ania, the video linked to in the article is private and not viewable.

On using serverless backends, I came with a workaround for persisting data beyond the runtime of a serverless function.
Here is the article I wrote to explain my approach: dev.to/ogbotemi2000/persist-data-i...

The workaround is generic and will work on both Netlify and Vercel, I hope it suffices as a means for storing temporary data without the *overhead of using or blobs or databases in serverless functions

by overhead I mean the extra learning curve of using and working with databases or blobs
Cheers!