Set up your project
Set up your project to develop your website locally.
Prerequisites
- Node.js installed locally (version 16.x)
- Yarn installed locally (version 1.22+)
- CLI installed
- Access to your GitHub customer repository
- Access to your studio (
https://<customer>.frontastic.io
)
To get started with development, follow these steps:
Get your API token from the studio
To get your API token from the studio, follow these steps:
- From the studio homepage, click the Account icon, then select Profile: the User settings dialog opens.
- Copy the value in the API token field and close the dialog.
- Save the copied value for later use.
Set up your project locally
To set up your project locally, follow these steps:
- Clone the GitHub repository of your commercetools Frontend project on your computer.
- Open a command-line tool and move to the root directory of your repository.
- To initialize your project, run
frontastic init --multitenant
in your command-line tool: you'll be prompted to enter the studio user API token. - Enter the API token you copied from the studio.
- To install the necessary dependencies, run
frontastic install
in your command-line tool. - To start your commercetools Frontend project, run
frontastic run
in your command-line tool. Once it has finished, you can preview your website by openinghttp://localhost:3000
in a web browser.
You can now start developing your website in your favorite IDE.