项目作者: khriztianmoreno

项目描述 :
🚀 Playground repo for Netlify’s Lambda Functions
高级语言: CSS
项目地址: git://github.com/khriztianmoreno/netlify-lambda-functions.git
创建时间: 2019-08-23T23:48:08Z
项目社区:https://github.com/khriztianmoreno/netlify-lambda-functions

开源协议:MIT License

下载


Netlify Status

Netlify Lambda Starter demo 🚀

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://netlify-lamda-function.netlify.com.

There are a lambda generating random emoji 👍 at ./src/lambda/emoji.js and random dog photos ./src/lambda/unsplash.js

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.

Deploy to Netlify

Table of Contents

Setup

To run the examples locally, here’s what you’ll need:

System Requirements:

cd into your local copy of the repository and run npm install

  1. $ cd netlify-functions-example
  2. $ npm install

Running the examples

  1. npm 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.