Files
meshcore-usb-dashboard/test-setup.js
T
Will Bradley 4767b67460 initial commit
2025-10-11 17:03:31 -07:00

26 lines
808 B
JavaScript

// Quick setup script for testing
const { createUser } = require('./src/auth/auth');
async function setup() {
try {
console.log('Creating test user...');
await createUser('admin', 'password123');
console.log('✓ User "admin" created successfully!');
console.log('✓ You can now start the server with: npm start');
console.log('✓ Login credentials: admin / password123');
process.exit(0);
} catch (error) {
if (error.message.includes('already exists')) {
console.log('✓ User "admin" already exists');
console.log('✓ You can now start the server with: npm start');
console.log('✓ Login credentials: admin / password123');
process.exit(0);
} else {
console.error('Error:', error.message);
process.exit(1);
}
}
}
setup();