- Visit the official Node.js website: Tap here to visit
- Download the Node.js installer.
- Run the installer.
- Follow the prompts in the installer.
- Open the project folder in VS Code.
- Open the integrated terminal:
- Right-click on the sidebar and select "Open in Integrated Terminal".
- Run the following command and wait for installation to complete:
(Internet is required for this step.)npm install
-
- Go to your MongoDB Compass Application then create a new database named Swiggy_Mern(or you can name it anything just change the name of the database in the backend config file to your respective db name).
- Sign up on the website.
- Create a new project.
- Go to the database section and build a database:
- Select M0, choose your region, and create a database.
- Setup username and password. Note: Do not use the
@
symbol in the password. - Whitelist IP
0.0.0.0
and click on Add Entry. - Connect to the database:
- Select the Compass option and copy the connection string.
- Paste it in
db.js
, replacing the placeholder password with the one you created earlier, and save changes.
- :
- Open the
.env
file in the backend folder and paste your Stripe secret key in theSTRIPE_SECRET_KEY
variable.
- Open the
- To run the backend, use:
npm run server
- Open the project folder in VS Code.
- Open the integrated terminal in the project directory:
- Right-click on the sidebar and select "Open in Integrated Terminal".
- Run the following command and wait for installation to complete:
(Internet is required.)
npm install
- After installation, you will see a
node_modules
folder in the sidebar. - To start the project, run:
npm run dev
- The project will open in your default web browser.