18 lines
571 B
JavaScript
18 lines
571 B
JavaScript
#!/usr/bin/env node
|
|
|
|
async function testEndpoint() {
|
|
try {
|
|
console.log('Testing connection to http://localhost:4000/api/vault/metadata');
|
|
const response = await fetch('http://localhost:4000/api/vault/metadata');
|
|
console.log('Response status:', response.status);
|
|
const data = await response.json();
|
|
console.log('Success! Response length:', data.length);
|
|
console.log('Sample item:', JSON.stringify(data[0], null, 2));
|
|
} catch (error) {
|
|
console.error('Error:', error.message);
|
|
console.error('Stack:', error.stack);
|
|
}
|
|
}
|
|
|
|
testEndpoint();
|