In this demo you will see:
- How to build a React web application to simulate an eCommerce
- How to build a NodeJS backend application to simulate an eCommerce
- Adding Open Telemetry traces
- NodeJS 16.x installed
- A container running a Mongo instance. Check this tutorial for more.
- A container running ZipKin for showing the OpenTelemetry traces. Check this tutorial to learn more.
- Make
dev.js
file insideconfig
folder - Add mongoDB info into dev.js file.
module.exports = {
mongoURI:'mongodb://user:password@localhost:27017'
}
-
Type
npm install
inside the root directory, to download server-side dependencies. -
Type
npm install
inside the client directory, to download front-end dependencies. -
Create an
upload
folder in the root of this project -
If you want to prepopulate the eCommerce you can copy all the files in
data/images
to theupload
folder. -
Use mongo restore to restore the database dump in the
data/dump
folder.
mongorestore --uri="mongodb://<user>:<password>@localhost:27017" dump/
The React part of this code repo is inspired in a YouTube tutorial. You can watch the tutorial to learn to build this application.