Hi there! This is a playground repo to test out Netlify’s Lambda Functions. You can see a live demo of the examples at https://functions-playground.netlify.com.
If you want your own copy to play around with, the quickest way to get it up and running is clicking the Deploy to Netlify button below. It will clone this repository into your own account, and deploy the site to Netlify.
To run the examples locally, here’s what you’ll need:
cd
into your local copy of the repository and run yarn
cd netlify-functions-example
yarn
yarn start
This will start the client server on http://localhost:8080, and the netlify-lambda server on http://localhost:9000.
netlify-lambda isn’t required to deploy Lambda functions to Netlify, but it offers some handy features out of the box that make it quicker to get started, like the local dev server and nice defaults for transpiling and bundling functions in production.
The client server is configured to proxy /.netlify
requests to the Lambda server (see webpack.client.js). This is the same behavior the site has when it’s deployed to Netlify.