Skip to content

πŸ‘¨β€πŸ’» Learn how to use netlify serverless functions to hide secret/API keys in a frontend JavaScript web application.

License

Notifications You must be signed in to change notification settings

frankiefab100/netlify-serverless-functions-demo

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

26 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Netlify Serverless Functions Demo

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

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

This branch is deploy via: https://testing--netlify-func-demo.netlify.app/.

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

How to run locally πŸš€

  1. Clone the testing branch project 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. Update netlify.toml file with the following commands:
[build]
  command = "npm run build"
  functions = "netlify/functions"
  publish = "dist" 
  1. Rename .en.example to .env
Replace your API key in the file

License πŸ“œ

This project is protected under the MIT License.


Built with ❀️