Local dev setup
This section describes how to run the project locally.
Prerequisites
The project uses Node.js. We recommend using a Node version manager to install Node.
The installation instructions below don't specify a version to install. This is because version management is handled via the .nvmrc
file in the project root. The default setup uses the latest Node LTS version available. However, you can pin a version in your project by modifying .nvmrc
.
# Download and install fnm:
curl -o- https://fnm.vercel.app/install | bash
# Download and install Node.js:
fnm install
# Verify the Node.js version:
node -v
# Verify npm version:
npm -v
Windows
Only fnm is supported on Windows.
# Download and install fnm:
winget install Schniz.fnm
# Download and install Node.js:
fnm install
# Verify the Node.js version:
node -v
# Verify npm version:
npm -v
Repository fork
We recommend working with a fork of the app repository. A fork allows you to easily incorporate updates from this boilerplate into your own codebase.
Authentication
PlentyONE system
- Add your API endpoint
- Add your API security token
Starting the app
- Open the repository in your command line interface.
- Run
npm install
to install all dependencies. - Run
npm run dev
to start the development server. The app will be served with hot reload at localhost:3000.
Custom configuration
By default, the app connects to a demo shop. The demo shop uses English as the default locale and German as a second locale. To connect to your own PlentyONE system, you have to update the API endpoint in the middleware and match the locale configuration in system and app.
For details, refer to the following guides: