initial commit
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
// 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();
|
||||
Reference in New Issue
Block a user