Installation

This guide will help you how to install contentstack-express.

Prerequisites

  • Node.js v4.2.0 or later

Note: Older versions(less than v4.2.0) of Node.js are not recommended.

Install CLI

To get and globally install the command line interface (CLI) on your system, run this command in a Terminal or Command Prompt:

$ npm install -g contentstack-cli

Note: For a global install of “contentstack-cli,” OSX/Linux users may need to prefix the command with “sudo” like this: sudo npm install -g contentstack-cli.

Once installed, you can use CLI to execute Contentstack commands.

Connect to your stack

In the terminal, navigate to your workspace, and run the “connect” command.

$ contentstack connect

This will prompt you to enter the stack api key and access token. You can find these details on your Stack’s page.

Enter your stack api key: {API_KEY}
Enter your stack access token: {ACCESS_TOKEN}

This will validate the stack. Once validated, you will be prompted to enter the project root directory and select the publishing environment (“development”) which we created in earlier steps.

Enter name of the directory to contain the project: (my-site)
Select the publishing environment:
1. development

This will automatically configure your project for the selected publishing environment along with the basic theme for the website.

On This Page

top-arrow