Processes climate-related data as an example of unstructured data handling
- Node.js (v14 or higher)
- OpenHIM Core and Console running locally (see OpenHIM documentation)
- Minio (RELEASE.2022-10-24T18-35-07Z)
- Clickhouse (v23.8.14.6)
git clone https://github.com/jembi/climate-mediator.git
cd climate-mediatornpm installtouch .env
npm run buildnpm start6. The mediator will be running on port 3000 by default. You can override this by setting the SERVER_PORT environment variable in your .env file:
SERVER_PORT=3001http://localhost:9001
# Default credentials
username: minioadmin
password: minioadmin
2. Create a minio access key and secret from the "Access Keys" page and set them to the ENVIRONMENT variables
MINIO_ACCESS_KEY:
MINIO_SECRETE_KEY:MINIO_BUCKET=climate-mediator,When creating a bucket the name must follow these following rules:
Bucket names must be between 3 (min) and 63 (max) characters long. Bucket names can consist only of lowercase letters, numbers, dots (.), and hyphens (-). Bucket names must not start with the prefix xn--. Bucket names must not end with the suffix -s3alias. This suffix is reserved for access point alias names.
To allow automatic creation of the bucket if it does not exist, include the createBucketIfNotExists query parameter and set it to true. This will ensure the bucket is created with the specified name if it is not already present.
/upload?bucket=:name&createBucketIfNotExists=trueThis optional parameter simplifies the process by eliminating the need to manually create buckets beforehand.
Navigate to /mediators/urn:mediator:climate-mediator and click the gear icon, next click the green button that states Minio Buckets Registry and add the bucket name and region to the two form elements that appear. Finally click Save Changes, the newly entered buckets should appear withing minio momentary.