From 278cd60c22373e14d43a586d684b15c2dde84023 Mon Sep 17 00:00:00 2001 From: Eric Cheatham Date: Thu, 5 Mar 2020 23:12:49 -0600 Subject: [PATCH] Remove references to lambdas from repo --- CONTRIBUTING.md | 2 +- README.md | 3 --- lambda/hello.js | 17 ----------------- netlify.toml | 4 ---- 4 files changed, 1 insertion(+), 25 deletions(-) delete mode 100644 lambda/hello.js diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5fb4820..942a972 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -23,7 +23,7 @@ $ yarn ### `build` -Build the static files into the `public` folder, turns lambda functions into a deployable form. +Build the static files into the `public` folder #### Usage diff --git a/README.md b/README.md index 552be68..328fcf8 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,6 @@ It follows the [JAMstack architecture](https://jamstack.org) by using Git as a s - Uses `gatsby-image` with Netlify-CMS preview support - Separate components for everything - Netlify deploy configuration -- Netlify function support, see `lambda` folder - Perfect score on Lighthouse for SEO, Accessibility and Performance (wip:PWA) - ..and more @@ -48,8 +47,6 @@ $ yarn $ netlify dev # or ntl dev ``` -This uses the new [Netlify Dev](https://www.netlify.com/products/dev/?utm_source=blog&utm_medium=netlifycms&utm_campaign=devex) CLI feature to serve any functions you have in the `lambda` folder. - To test the CMS locally, you'll need to run a production build of the site: ``` diff --git a/lambda/hello.js b/lambda/hello.js deleted file mode 100644 index ea69fef..0000000 --- a/lambda/hello.js +++ /dev/null @@ -1,17 +0,0 @@ -// For more info, check https://www.netlify.com/docs/functions/#javascript-lambda-functions -module.exports.handler = async function(event, context) { - console.log("queryStringParameters", event.queryStringParameters) - return { - // return null to show no errors - statusCode: 200, // http status code - body: JSON.stringify({ - msg: "Hello, World! This is better " + Math.round(Math.random() * 10) - }) - } -} - -// Now you are ready to access this API from anywhere in your Gatsby app! For example, in any event handler or lifecycle method, insert: -// fetch("/.netlify/functions/hello") -// .then(response => response.json()) -// .then(console.log) -// For more info see: https://www.gatsbyjs.org/blog/2018-12-17-turning-the-static-dynamic/#static-dynamic-is-a-spectrum diff --git a/netlify.toml b/netlify.toml index 101f794..90647d1 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,7 +1,3 @@ -[build] - publish = "public" - command = "npm run build" - functions = "lambda" [build.environment] YARN_VERSION = "1.9.4" YARN_FLAGS = "--no-ignore-optional"