website logo
Navigate through spaces
⌘K
OVERVIEW
ORDER MANAGEMENT (OMS)
SHIPPING - SETUP
Shipping Methods
Shipping Zones
Shipping Method Setup Examples
TAXES - Setup
Tax Automation with Stripe Tax
Tax Automation with Avalara
CONTENT MANAGEMENT (CMS)
DATA
CUSTOMER LIFETIME REVENUE
Customer Lifetime Revenue Explanation
Customer Lifetime Revenue and Purchase Likelihood
Recency Frequency and Monetary
CLR and RFM Data Table Glossary
RFM and CLR in the Hub
LOOKER
Modifying a Dashboard
Timestamp differences between Looker, OMS and Shopify
How to create custom calculations in Looker
Looker and Shopify data models
Custom fields
How to 'Save and Schedule' reports
Creating Custom Reports or Look
Looks vs Dashboards
Login Looker FAQ
Looker Glossary
SEGMENT EVENT TRACKING
What are event tracking
Adding Tracking
What is the Tracking Plan?
The Chord Tracking Plan
The Shopify Tracking Plan
Event Tracking FAQ
EVENT UPDATES PAGE
Email Subscription Payment Event Update
Product Feed Setup
Getting Segment to Production
Consent Management
Installing in Next.js
Installing in Gatsby
Integrations
👩‍💻Developer Tools
Using Chord with Shopify
Docs powered by archbee 

Developing

7min

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
|
npm run dev


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

Running unit tests

yarn
npm
|
yarn test            # runs all tests
yarn test:watch      # runs all tests in watch mode


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
|
yarn build


Builds the site for production.

Starting a production server

yarn
npm
|
yarn start


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
|
yarn analyze


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

Updated 03 Mar 2023
Did this page help you?
Yes
No
PREVIOUS
Quick Start
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