Git Product home page Git Product logo

functions's Introduction

Everything you ever wanted to know about Netlify Functions ⚡️

Netlify Status

Contents

Adding an example function

  1. Fork the repo

  2. Clone down your fork

  3. Use npm to install dependencies npm install

  4. Create a new markdown, .md, file in examples/ folder using the following template:

    ---
    title: Example title # Add an example title
    code: ...netlify/repo-name # Add the GitHub source path
    tags:
      - react # Add optional tags
    ---
    Include any reference content you wish
  5. Test the site locally npm run build

  6. Push your changes up to your fork

  7. Submit a pull request to this repo, making sure to follow the contributing guidelines and explaining the details of your contribution

Installing

  1. Clone the repo using git clone [email protected]:netlify/functions.git
  2. Use npm to install dependencies npm install
  3. Create a .env file with the environment variables listed below
  4. And run the site locally npm run dev

Environment variables

You'll need to generate a GitHub Access Token to retrieve stars and forks. Add the following to your .env file:

URL=http://localhost:8080
GITHUB_TOKEN=
SLACK_WEBHOOK_URL=
GREETING="hi smashingconf"

Options

  • npm run dev will spin up a development environment and watch for changes
  • npm run build builds a production version of the site to dist
  • npm run debug will the eleventy debugger

Dependencies

All dependencies are development at the moment

  • @11ty/eleventy
  • dotenv
  • @11ty/eleventy-plugin-rss
  • @11ty/eleventy-plugin-syntaxhighlight
  • @quasibit/eleventy-plugin-sitemap
  • eleventy-plugin-sass
  • eleventy-plugin-seo

Credits

functions's People

Contributors

daviddarnes avatar philhawksworth avatar scottmathson avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.