Shopify
Build a Shopify App with Node and React
Reference https://shopify.dev/tutorials/build-a-shopify-app-with-node-and-react/set-up-your-app
Requirement
node -v
should be 8.1.0 or higher
How is this being created?
- Run script
mkdir sample-embedded-app
cd sample-embedded-app
yarn init -y
yarn add react react-dom next
-
Create new folder
pages
-
Create new file
pages/index.js
const Index = () => (
<div>
<p>Sample app using React and Next.js</p>
</div>
);
export default Index;
- Update
package.json
Add "scripts"
{
...
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"dev": "next",
"build": "next build",
"start": "next start"
}
}
- Run
yarn run dev
Browse http://localhost:3000
+-----------------------------------------+
| |
| Sample app using React and Next.js |
| |
+-----------------------------------------+