npm install --global sfcc-playground@beta
or if you feel adventurous, use alpha
npm install --global sfcc-playground@alpha
The playground uses dw-api-mock
. You need to be able to access the repository (see the Trailhead module).
The playground uses cosmiconfig so you can use:
- a
sfcc-playground
property in package.json - a
.sfcc-playgroundrc
file in JSON or YAML format - a
.sfcc-playgroundrc.json
,.sfcc-playgroundrc.yaml
,.sfcc-playgroundrc.yml
,.sfcc-playgroundrc.js
, or.sfcc-playgroundrc.cjs
file - a
sfcc-playground.config.js
orsfcc-playground.config.cjs
CommonJS module exporting an object
Value | Description | Default value |
---|---|---|
rootDir | Root directory of the project | process.cwd() |
cartridgesDir | Path to cartridges directory | ${cwd}/cartridges |
cartridgePath | Cartridge path | app_storefront_base |
modulesPath | Path to modules directory | ${cwd}/cartridges/modules |
apiPort | Port to use for API app | 8080 |
Run the playground in your project folder (create a config file if needed).
sfcc-playground
Open browser on http://localhost:8080
(or on the port you specified in the config).