live link-https://mediconnect-9hzp.onrender.com/
Untitled.video.-.Made.with.Clipchamp.mp4
In this guide, we'll walk you through the process of setting up MongoDB for your MediConnectSeva application.
-
Create a
.env
File:- Create a file named
.env
in the root directory of your project.
- Create a file named
-
Add MongoDB URI:
-
Add the following line to your
.env
file, replacing<username>
,<password>
,<cluster-uri>
, and<default-database>
with your MongoDB credentials and database details:MONGODB_URI=mongodb+srv://<username>:<password>@<cluster-uri>/<default-database>?retryWrites=true&w=majority
Example:
MONGODB_URI=mongodb+srv://Arshit:xyz@cluster0.xyzabc.mongodb.net/mediconnect?retryWrites=true&w=majority
-
Before proceeding, ensure you have Node.js and npm installed on your system.
-
Install Node.js and npm:
- If Node.js and npm are not installed, download and install them from nodejs.org.
-
Install Project Dependencies:
-
Open your terminal and navigate to the root directory of your project.
-
Run the following command to install dependencies:
npm install
-
Once MongoDB URI is configured and dependencies are installed, you can start the MediConnectSeva application.
-
Start the Application:
-
Run the following command in your terminal:
npm start
-
-
Access the Application:
- Open your web browser and go to
http://localhost:5000
to use the MediConnectSeva application.
- Open your web browser and go to
By following these steps, you've successfully set up MongoDB for your MediConnectSeva application. The .env
file securely manages your MongoDB URI, and running npm install
installs necessary dependencies while npm start
launches your application on port 5000.
If you encounter any issues or have further questions, feel free to reach out!