This repository contains the backend code for the Pixel Pipers application.
git clone https://github.com/darkneux/Pixel_Pipers_Backend.git
{
"username": "<your_username>",
"password": "<your_password>",
"token": "<create_a_token>"
}
Replace <your_username>
and <your_password>
with your desired username and password.
Generate a token with 12 characters and replace <create_a_token>
.
To enable image uploading functionality, you'll need to add your Cloudinary credentials to app.py
. Follow these steps:
- Obtain your Cloudinary API credentials (API Key, API Secret, Cloud Name).
- Open
app.py
. - Find the section where Cloudinary configuration is set up (typically near the top of the file).
- Replace the placeholders with your actual Cloudinary credentials:
cloudinary.config(
cloud_name = "<your_cloud_name>",
api_key = "<your_api_key>",
api_secret = "<your_api_secret>"
)
python app.py
Alternatively, you can run the application using Docker.
Build the Docker image by running the following command from the root directory of the project:
sudo docker build -t <image_name> .
Replace <image_name>
with your desired name for the Docker image.
Once the Docker image is built, you can run the application within a Docker container using the following command:
sudo docker run -p 80:5000 -v ./PIPE_model:/code/ <image_name>
-p 80:5000
maps port 80 of the host machine to port 5000 of the Docker container, allowing access to the application.-v ./PIPE_model:/code/
mounts thePIPE_model
directory from the host machine to/code/
within the container, ensuring that the application can access the required files.