-
Clone the repo
git clone https://github.com/shouryade/LMTSM-Backend.git cd LMTSM-Backend
-
Make your you have Python 3.10 installed on your system. If not, you can download it from here.
-
Install pipenv by running the following command in your terminal:
pip install pipenv
-
Install the dependencies
pipenv install
-
Activate the virtual environment
pipenv shell
-
Run the server
pipenv run python -m app
-
The server should be up and running on http://localhost:8100
- Rename the
.env.sample
file to.env
- Replace the values of the variables with your own values
- Close the server by pressing
Ctrl + C
in the terminal. - Restart the server by running the following command:
pipenv run python -m app
You can access the documentation of the backend by visiting http://localhost:8100/docs
You can also try out the API endpoints by first authenticating and creating a user and setting their role to super_admin
(using MongoDB Compass) and then using the Try it out
button to make requests to the API.
Make sure you have docker and docker-compose and you are added in the docker user group. Run the following command to start the containers and setup volumes.
docker-compose -f docker-compose-prod.yml up -d
Execute docker ps
to know the uptime and other details regarding the containers.