Giter Site home page Giter Site logo

frankiefab100 / netlify-serverless-functions-demo Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 3.0 1.81 MB

๐Ÿ‘จโ€๐Ÿ’ป Learn how to use netlify serveless functions to hide secret/API keys in a frontend JavaScript web application.

Home Page: https://netlify-func-demo.netlify.app

License: MIT License

JavaScript 96.71% Shell 3.29%
netlify netlify-deployment netlify-functions demo-app tutorial tutorial-code lambda-functions netlify-lambda freecodecamp freecodecamp-javascript

netlify-serverless-functions-demo's Introduction

Netlify Serverless Functions Demo

Companion repository for the tutorial demostrating how to hide secret keys using netlify functions in a Frontend application

netlify-serverless-functions-demo forks netlify-serverless-functions-demo stars netlify-serverless-functions-demo issues netlify-serverless-functions-demo licence

What do you mean by "Netlify functions" ?

Netlify Functions are files used deploy server-side code as API endpoints without the need of backend.

Prerequisites

To follow along with this tutorial, basic understanding of RESTful APIs and async/await is required.

Getting Started

It is recommended to start off from the testing branch.

The final demo app lives in the main branch: https://netlify-func-demo.netlify.app/

How to run locally ๐Ÿš€

  1. Clone the repository
git clone https://github.com/frankiefab100/netlify-serverless-functions-demo.git
  1. Change to netlify-serverless-functions-demo directory
cd netlify-serverless-functions-demo
  1. Install dependencies
npm install
  1. Run the app on the server
netlify dev

The project will be ready on localhost:8888 via: https://localhost:8888/.netlify/functions/getPhotos

Note: Add your API keys as Environment variable in .env: PIXABAY_API_KEY=your-api-key-here

License ๐Ÿ“œ

This project is protected under the MIT License.

Deploy

netlify

Resources

Check out the blog post: https://www.freecodecamp.org/news/hide-api-keys-in-frontend-apps-using-netlify-functions/

Relevant Links


Built with โค๏ธ

netlify-serverless-functions-demo's People

Contributors

frankiefab100 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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.