sudo apt-get install git
sudo apt-get install nodejs
Clone this app using the command:
git clone https://github.com/shubhamsarkar9654/Turing-e-commerce-bakend
cd e-commerce_backend/
npm install
to install the dependencies- Create a .env file in the root directory of the project and update the required variables. You can use
sample.env
as the skeleton. npm start
to run the server. The server will run with auto reloading using nodemon.
Note: Check Import Schema
section under Important Commands
to see how to import the tshirtshop.sql file into your DB.
mysqldump -u root -p --no-data e_commerce > schema.sql
mysql -u username -p e_commerce < sqlScript/tshirtshop.sql
npm start
This needs to be run from the root of the project.
Make sure to re-start the server after doing adding product,customer because the product features loads all the products and customer in memory to load the customer or product. If you don't restart the server, then it will keep on products or customer from the old dtabase memory.