website logo
Navigate through spaces
Chord Commerce
⌘K
Getting Started
CMS
Data
OMS
Integrations
👩‍💻Developer Tools
Shopify
Docs powered by archbee 

Developing

Here are some common scripts that you'll use to work with Chord's Next.js starter kit. As with any Next.js site, you can customize the scripts in package.json , but we'll describe the defaults here.

Starting a development server

yarn
npm
|

Starts a Next.js server in development mode on http://localhost:3000. Hot reload is automatically enabled.

Running unit tests

yarn
npm
|

This starter uses Jest, and react-testing-library to test React components. Running the tests in watch mode will re-run the tests any time a code change is detected.

Building a production site

yarn
npm
|

Builds the site for production.

Starting a production server

yarn
npm
|

Starts a production Next.js server on http://localhost:3000.

Optimizing a production site

The starter kit comes with @next/bundle-analyzer , which generates a visualization of the site's Javascript bundles. This can be helpful for understanding and optimizing bundle size.

yarn
npm
|

Runs next build and also opens a browser window with an interactive visualization of bundles.

Updated 28 Nov 2022
Did this page help you?
Yes
No
UP NEXT
SDK Reference
Docs powered by archbee 
TABLE OF CONTENTS
Starting a development server
Running unit tests
Building a production site
Starting a production server
Optimizing a production site