Setting Up your Nuxt.js Development Enviornment


Once logged into Agility CMS, you'll want to grab your API credentials so your Nuxt site can authenticate and retrieve data from your instance.

From your Agility CMS dashboard, click into Settings > API Keys.


Take note of your GUID and your Live API Key and Preview API Key credentials and copy these somewhere temporarily as you'll need to use them later.

Get The Code

  1. Clone this repository, and open it in your favorite Text Editor
  2. Run npm install or yarn install to install packages and dependencies

Set up Authentication

  1. Rename your .env.example file to .env 
  2. Overwrite the values in the .env file using your GUID, FETCH & PREVIEW API KEYS.
# Your Instance Id
# Your Live API Key
# Your Preview API Key

Start The Site

To run the site locally:

  1. run npm run generate to generate your static pages.
  2. run npm start for a dev server, then Navigate to http://localhost:3000/.

The app will automatically reload if you change any of the source files. This will also load the latest (staging mode) content from Agility CMS. When you change the content in the CMS, simply reload your page to see those changes updated on the site.


Did you get a Build Error?

If you get an error during the build, check your log and ensure that you've entered the correct GUID and API Keys in your .env file.

0 out of 0 found this helpful



Please sign in to leave a comment.