-
Python: Ensure that Python is installed on your machine. You can download it from python.org .
-
MongoDB: Make sure you have the MongoDB connection string. You can email me at [email protected] for the PlannerPlus DB connection string or setup a MongoDB Atlas account of your own to setup your own db.
- Clone the repository:
git clone https://github.com/sibycr18/PlannerPlus---Task-Manager/tree/master
cd src/API_server
- Install dependencies:
pip install -r requirements.txt
- Create a
.env
file in the root of your project. - Add the following variables to the
.env
file:
CONNECTION_STRING=<your-mongodb-connection-string>
- Open a terminal in the project directory.
- Run the following command to start the Flask server:
python app.py
The server should start running on http://127.0.0.1:5050/
.
You can test the API by using tools like Postman or Hoppscotch .
- Test the connection: Send a GET request to
http://127.0.0.1:5050/api/test
to ensure that the server is running. OR Head toroot/tests
folder for the automated api connection test. - Register a new user, login, and test other endpoints as needed.
To stop the server, press Ctrl + C
in the terminal where the server is running.
Now you have your Flask API server up and running locally!