feat(core): setup postgres, minio, and authentik next-auth
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import { Client } from 'minio';
|
||||
import * as dotenv from 'dotenv';
|
||||
dotenv.config();
|
||||
|
||||
const minioClient = new Client({
|
||||
endPoint: process.env.MINIO_ENDPOINT,
|
||||
port: parseInt(process.env.MINIO_PORT),
|
||||
useSSL: process.env.MINIO_USE_SSL === 'true',
|
||||
accessKey: process.env.MINIO_ACCESS_KEY,
|
||||
secretKey: process.env.MINIO_SECRET_KEY,
|
||||
});
|
||||
|
||||
async function testMinio() {
|
||||
try {
|
||||
console.log('Testing MinIO connection on port', process.env.MINIO_PORT, '...');
|
||||
const buckets = await minioClient.listBuckets();
|
||||
console.log('Success! Buckets:', buckets.map(b => b.name));
|
||||
} catch (err) {
|
||||
console.error('MinIO Error:', err.message);
|
||||
}
|
||||
}
|
||||
|
||||
testMinio();
|
||||
Reference in New Issue
Block a user