This project is the source code for the blog post "Build and Deploy Secure Serverless Functions with Netlify." A complete walkthrough video is also available on YouTube.
- Node.js version 12 or higher
- A free Netlify account
- A free Okta developer account
- A good code editor, such as Visual Studio Code
The complete steps are explained in the blog post or video.
- Clone or download this source code
- Open your terminal/command prompt, change to the project folder, and install dependencies using
npm install - Copy the
.env.samplefile to.env - Create a new "Single-Page Application" in the Okta Developer dashboard
- Copy your application's Client ID and Org URL to the
.envfile - Edit
client/index.jsand change theoktaOrgUrlandoktaClientIdvalues to match your Okta Org URL and Client ID - Build the project from the command line using
npm run build
npx netlify-cli devNote: You can also install the
netlify-clitool locally usingnpm install --save-dev netlify-clior globally usingnpm install -g netlify-cli. After installing locally, you can usenpx netlify devor globally you can usenetlify dev.