Chord OMS
...
Developer Tools
Gatsby
Developing
7min
chord's gatsby starter is fully functional gatsby ecommerce site, powered by the chord api and contentful the github repo includes pages, templates, components, and graphql queries that work out of the box, but are fully editable so you can build something beautiful! here are some common cli commands that you'll use to work with the starter starting a development server yarn yarn start npm npm start this command starts the development server by default, your site will be available at http //localhost 8000 , but if that port is already in use, you'll be prompted to choose another port hot reload is automatically enabled running tests npm npm test # runs all tests npm run test\ watch # runs all tests in watch mode this starter uses jest and react testing library to test react components you can run npm run test\ watch as you're working on your tests to have the tests re run automatically as you're editing them building the production site npm npm run build this command will compile the site and get it ready for deployment it will result in a directory called public that contains your entire static site previewing the production site npm npm run serve you can run this command to serve the production site you've generated with npm run serve , usually for local testing clearing your local cache npm npm run clean you might try this command if your local project seems to have issues around not getting the correct content it wipes out your local cache product merchant feed this starter generates a product rss feed that should be compatible with google merchant and facebook ads to get your products to show across google, including shopping ads, you must upload a product feed to your google merchant center we will not cover configuring google merchant center in this documentation however, here is a few useful things to know about the feed the product feed is generated automatically every time the site is built (via npm run build or yarn build ) the product feed can be found in your default build folder, under products rss example /public/products rss the feed is also being served at the root of your web site (example http //localhost/products rss ) the feed is built using a local plugin located at /plugins/gatsby plugin products feed , which is configured in /gatsby config js this plugin offers default feed options, and being a local plugin, it can be extended to suit your needs please refer to the plugin's documentation located at /plugins/gatsby plugin products feed/readme md for more details additionally, the documentation covering all google product data attributes can be found here