This is a Next.js project bootstrapped with create-next-app
.
-
Navigate to your project then go to tab
Integrations
. -
In section
Browse Integrations
choseCommercetools
. -
Fill out settings page
-
Click on
Save
button.
-
Navigate to your project then go to tab
Integrations
. -
In section
Browse Integrations
choseContentful
. -
Navigate to your Data Types page
-
Create new Contentful Data Source with public ID 'contentfulDataSource'
-
Fill data source page with necessary credentials
-
Click on
Save
button.
UNIFORM_API_KEY
: your uniform api key⚠️ For the initial setup, this API key needs the Developer role assigned to it.UNIFORM_PROJECT_ID
: your uniform projectCOMMERCETOOLS_PROJECT_KEY
: your Commercetools project keyCOMMERCETOOLS_CLIENT_ID
: your Commercetools client idCOMMERCETOOLS_CLIENT_SECRET
: your Commercetools client secretCOMMERCETOOLS_API_URL
: your Commercetools api urlCOMMERCETOOLS_AUTH_URL
: your Commercetools auth urlGOOGLE_ANALYTICS_ID
: optional, for ga-plugin
- In your terminal, from the project root, run the following command:
npm i
-
In your code editor and rename
.env.example
to.env
file and add yourUNIFORM_API_KEY
,UNIFORM_PROJECT_ID
,COMMERCETOOLS_PROJECT_KEY
,COMMERCETOOLS_CLIENT_ID
,COMMERCETOOLS_CLIENT_SECRET
,COMMERCETOOLS_API_URL
andCOMMERCETOOLS_AUTH_URL
variables⚠️ For the initial setup, this API key needs the Developer role assigned to it. -
This command pushes all configurations to your new Uniform project.
npm run push
- Run the production server:
npm run build && npm run start
or development server:
npm run dev
Open http://localhost:3000 with your browser to see the result.