Property system: - Rename belonging → property throughout (model, controller, routes, service) - Add property sub-models: buildingModel, landModel, belongingModel - Add property lifecycle events: createProperty, deleteProperty - Add propertyStatus component (model, controller, routes, service, seeder) - Add commodity and commodityTransaction model stubs Infrastructure: - Update transactionModel and transactionService - Update events/index.js for new property events - Update seeder (seederDBConnection, seederRunner) - Update typesense client configuration - Update upload utilities (bucket, minio) - Update featureModel and featureSeeder - Update categorySeeder - Update TsApiFeatures utility - Remove docker-compose.yml (moved to root) - Remove legacy belonging component files
25 lines
547 B
JavaScript
25 lines
547 B
JavaScript
const Minio = require('minio')
|
|
|
|
const endPoint = process.env.AWS_ENDPOINT || 'localhost'
|
|
const accessKey = process.env.AWS_ACCESS_KEY
|
|
const secretKey = process.env.AWS_SECRET_KEY
|
|
const region = process.env.AWS_REGION || 'us-east-1'
|
|
const port = parseInt(process.env.AWS_PORT) || 9000
|
|
const useSSL = process.env.AWS_USE_SSL === 'true'
|
|
|
|
const clientOptions = {
|
|
endPoint,
|
|
useSSL,
|
|
accessKey,
|
|
secretKey,
|
|
region,
|
|
}
|
|
|
|
if (port) {
|
|
clientOptions.port = port
|
|
}
|
|
|
|
const client = new Minio.Client(clientOptions)
|
|
|
|
module.exports = client
|