This api is written in node.js and is designed to handle image uploads. Uploaded images are physically stored in an AWS S3 bucket and corresponding image metadata (description, filetype and filesize) are stored in a MySql database hosted on AWS RDS.
-
Please make sure that you have:
-
Git installed.
-
Docker installed.
-
Docker-compose installed.
-
An AWS account (free tier is sufficient). You'll need to get your AWS credentials as explained here. You'll also need to set up an AWS S3 bucket and an AWS RDS MySql Database. Since this is a hobby project, allow public access for both your S3 bucket and AWS RDS database so the api can communicate with them.
-
-
Next, update the project credentials and configurations as described below:
-
Update the credential file in the project directory (at
/api/.aws/credentials
) with your AWS credentials (aws_access_key_id and aws_secret_access_key). -
Update the config file in the project directory (at
/api/src/config/env.config.js
) with the relevant parameters for your S3 bucket and AWS RDS MySql database. Also update the 'API_PORT' variable in the same file, with the port you'd like to run the API on (default is 8080).
-
To run the project, please follow the steps below on a command line:
-
Clone the project repository by running the following command:
git clone https://github.com/Nseghe/image_processing_api
.
-
Navigate into the cloned project directory and run the following command:
docker-compose build && docker-compose up
.