The E-commerce MEAN App combines the power of MongoDB, ExpressJS, Angular, and Node.js with the design and user interactions with the products.
-
Download and Start MongoDB service first by
sudo systemctl start mongod -
You need to install both
nodejsandangularto run this project:- Install nodejs from here then install
npmglobally by:npm install -g npm - Install the Angular CLI globally by
npm install -g @angular/cli
- Install nodejs from here then install
-
To get started,
git clonethe project into the desired location on your machine. -
Once cloned,
cdinto theapidirectory and runnpm ito install the required development dependencies. Once these scripts complete, runnpm run devto run the development server. -
Then, in another terminal
cdinto theangulardirectory and runnpm ito install the required production dependencies for angular. Once these scripts complete, runng serveto build and serve the application. -
Once the development server has started and is connected to the MongoDB database, open your preferred browser and navigate to "localhost:4200" to use the app.
MongoDB connection string is stored in process.env.db
In development, all Angular components, modules, and services are located in the "angular/src" directory. The app has three main components: Home, Products, and User. The Home component contains the home page serving as the landing page for the app. The Products component uses the data service to retrieve all products and programmatically display them as Material Design cards. Finally, the User component can interact with these products, get/add/edit/delete any product after registering or logging in.