This time, I will show how to use Minio (Object Storage) for uploading multimedia data using Nodejs.
Step 1: Install Minio Locally Using Docker
The example above works this way:
mkdir
creates a new local directory at~/minio/data
in your home directory.docker run
starts the MinIO container.-p
binds a local port to a container port.-name
creates a name for the container.-v
sets a file path as a persistent volume location for the container to use. When MinIO writes data to/data
, that data mirrors to the local path~/minio/data
, allowing it to persist between container restarts. You can replace~/minio/data
with another local file location to which the user has read, write, and delete access.-e
sets the environment variablesMINIO_ROOT_USER
andMINIO_ROOT_PASSWORD
, respectively. These set the root user credentials. Change the example values to use for your container.
Step 2: Setup Project and Install Dependencies
Step 3: Code
Environment File
Step 4: Testing
Thank you for reading!
Happy Coding!!!!!!!