This app was created using create-react-app. It is for demonstrating how to store netlify secrets. It is part of the article how to access secret API keys using netlify functions in a react app which was published on freeCodeCamp. It is recommended you run this project while reading through the article to derive maximum benefit from it.
If you have any questions, feel free to open an issue here. I will be more than happy to help.
To run the app locally on your machine, follow the steps below:
-
Fork this project under your own account.
-
Clone the forked project to your local machine using the command below. Do not forget to replace
GITHUB_USER_NAME
with your GitHub username.git clone https://github.com/GITHUB_USER_NAME/netlify-secrets-demo-app.git
or
git clone git@github.com:GITHUB_USER_NAME/netlify-secrets-demo-app.git
-
Run the command
npm install
to install dependencies. -
Create
.env
file at the root of the project directory. Copy and paste the contents of example.env file. Set the value of the environment variableREACT_APP_TODO_BASE_URL
to"https://jsonplaceholder.typicode.com/todos"
for the purpose of this demonstration. -
Start the development server by running the command
npm start
.