Create application
You need to create a new Next.js application. You will add Uniform Context functionality to this app as you complete this tutorial.
Create app
Open a command-line interface (CLI) & enter the following command:
npx create-next-app my-uniform-app
About this command
This creates a basic Next.js application in a folder named
my-uniform-app. This is the root folder for the web app.
tip
You can assume that the path for any file mentioned from this point on relative to the root folder for the web app unless otherwise indicated.
Add environment variables
Add the following file, using the values you saved when you created the API key:
UNIFORM_API_KEY=[!!! YOUR API KEY !!!]
UNIFORM_PROJECT_ID=[!!! YOUR PROJECT ID !!!]
About this file
This file contains a set of environment variables that Uniform Context expects to be available when the web app is built.
tip
If you are unfamiliar with environment variables, this Medium article provides an excellent introduction.