This is a simple webshop example showcasing the usage of Commerce.js, MUI, and Stripe.
- Log in or create an account on Commerce.js.
- Go to the "Developer" section and copy your API key (sandbox, public).
- Log in or create an account on Stripe.
- Go to Developer -> API keys and copy your publishable key.
git clone https://github.com/samiralibabic/commercejs.git
Add .env
to your .gitignore
file to avoid publishing sensitive data.
Create a new file named .env
at the root of the project and add your Commerce.js and Stripe Keys:
REACT_APP_CHEC_PK=your_commercejs_api_public_key
REACT_APP_STRIPE_PK=your_stripe_api_public_key
Add Stripe as payment gateway in commercejs Dashboard.
npm install
npm start
Please note that by ignoring the
.env
file, you are preventing the API key from being exposed in github. This is important to ensure the security of your application.
The server runs on http://localhost:3000
. Happy coding!