Chord OMS
...
Developer Tools
Next.js

Developing

5min
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 yarn dev 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 yarn test # runs all tests yarn test\ watch # runs all tests in watch mode npm npm test # runs all tests npm run test\ watch # runs all tests in watch mode this starter uses jest https //jestjs io/ , and react testing library https //github com/testing library/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 yarn build npm npm run build builds the site for production starting a production server yarn yarn start npm npm 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 yarn analyze npm npm run analyze runs next build and also opens a browser window with an interactive visualization of bundles