Developing with commercetools Frontend
In this guide, you'll learn about the developer tooling and set up your project for development.
commercetools Frontend provides developers with essential tooling to help them with the development and deployment.
These are two of the essential tool for developers:
- CLI is our commandline interface that you can use for development. You can read the CLI quick start guide to learn about it in details.
- A sandbox is a virtual machine hosted in the cloud that you can provision from the developer area of the studio and use for developing extensions. Read the sandbox article to learn more about using them.
The CLI is the central entry point for development. It's possible to run Webpack, which prepares all frontend code directly on your machine and everything else in the cloud.
Run the command below to install the latest version of the CLI
Configure the project
frontastic init to initialize your project you'll be asked some questions to set up your configuration. Use the arrow keys on your keyboard to choose the desired option.
To get started quickly, use the answers below:
Which project do you want to work on?— this will only appear if you have more than 1 project in your folder.
Are you using a sandbox or a staging server for development?— Choose the staging server to start with.
Install project dependencies
frontastic install to install all the dependencies for your projects. The CLI installs all the dependencies in the respective folders.
Do not run
yarn install at the root of the repository as it'll not install dependencies in the sub-directories.
Start the project
frontastic run to start the project and open
http://localhost:3000 in your browser. You should see the default home page as shown below
🎉 You have successfully set up the project locally. You can start the development now.